Mail Archives: djgpp/1996/03/20/05:35:22
I know what `hooking an interrupt' is, but is there a routine in djgpp to do
it thus?:-
#include<dos.h>
int zxcvbnm(Regs&R){blah(); blah(); waffle(); blah();};
/*-----*/
main(){ .........
hook_an_interrupt(0x21,zxcvbnm);
and from here on, any call of an int21 interrupt will do this:-
Preserve the registers in a `Regs' as described in \djgpp\include\dos.h .
Call zxcvbnm() with that Regs as its argument.
If zxcvbnm() returns 0, return to the user program.
If zxcvbnm() returns non-zero, go to the previous entry address of int21.
That would be useful.
- Raw text -