Intercepting Interrupt Vectors
LMS5 at psuvm.psu.edu
LMS5 at psuvm.psu.edu
Sun Apr 15 02:42:33 AEST 1990
I am currently working on a TSR that will capture both keystroke and mouse
input. To do this it is nesseccary to intercept both key and mouse
interrupts. According to my Turbo C reference book the getvect() and setvect()
functions are good only for replacing and restoring the ISR address in a DOS
interrupt (21h) function. However, the variables ,for these functions, are
described as interrupt numbers not as functions numbers of the DOS interrupt
number 21h. For example:
setvect(0x28, dos_idle); /* 0x28 is the function of DOS interrupt 21h */
setvect(8, new_int8); /* 8 is also a function of DOS interrupt 21h not
an interrupt itself or is it? */
old_int28 = getvect(0x28); /* 28 is the ISR addr of the DOS function
dos_idle interrupt, function 8 is the DOS
timer interrupt */
Confused yet? So am I. What I need to do is grab the ISR address
of 3 different function under the Mouse Interrupt number of 33h. It appears
as if I will have to write assembler code to do this, but the section in the
Assembler book I am referencing isn't any clearer. Is there anyone out there
that can help me make sense of all this? Fortunately, the professor I am
writing this for is not in any big hurry.
Thanks in Advance,
Laurie M. Salopek
LMS5 at PSUVM
Computer Operator
Pennsylvania State University
More information about the Comp.lang.c
mailing list