Mail Archives: djgpp/1998/10/05/19:15:16
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
- Raw text -