Mail Archives: djgpp/1998/10/06/02:15:36
Hi again,
sean wrote:
> Hi,
>
> In DOS with DJGPP, not using Allegro.
> I'm programming simple code that reprograms the Timer Interrupt.
> The OLD ISR function gets stored in the 'pm_offset' variable of a
> '_go32_dpmi_seginfo' structure.
> I need to Call the OLD ISR again, from within the NEW ISR I create.
> But, its stored as a variable, not a Interrupt Function like in Real
> Mode compilers.
>
> Originally some code I found works, given that I don't ever have to use
> the OLD ISR again.
> So, I tried this:
>
> _go32_dpmi_seginfo new, old;
>
> // I added this
> void (*oldISR)();
>
> void newISR()
> {
> ... // my stuff
>
> // here's where I'll be calling the OLD ISR again
> oldISR();
>
> ... // my stuff
> }
>
> void reprogramTimer()
> {
> ... //some stuff, gets the pointer to the OLD ISR, puts it into the
> 'old' structure variable
>
> // And added this
> (int)oldISR = old.pm_offset;
>
> // which leaves me to wonder how to get 'old.pm_selecter' as
> well
>
> ... //other stuff
> }
>
> This concept Crashes.
> Do I need to Enable or Disable Interrupts a certain way?
>
> Please, any other methods I should consider?
>
> I'll appreciate any help :)
> Thanks In Advance.
> --Sean
Ok... I've found s'more code.
It appears that if I used all REAL MODE interrupt vectors, then I can use
'_go32_simulate_fcall_' to re-run the OLD ISR.
But, If I'm using Protected mode vectors, then there is no need to re-run
the OLD ISR 'tall :)
Does this seem correct?
Thanks In Advance.
--Sean
- Raw text -