Mail Archives: djgpp/1997/01/23/21:57:20
John Eccleston wrote:
> Could someone please give me some pointers as to what I am doing wrong
> with this interrupt handler for the keyboard.
If it helps, look at the keyboard handler on my page. You might find
your problem by comparing source.
> How would I get hold of the scancode for the key within the
> function my_handler?
I just use the lower 8 bits of the keypress value sent from the
keyboard. Values from 0-127 indicate that a key was pressed, and values
from 128-255 mean a key was released.
> Is it OK to write an interrupt handler in C if you lock the code and
> data? I know the FAQ says to write it in assembler but it mentions nothing
> about _go32_dpmi_lock_ functions.
Yes, you can do that. You should lock your code and data even if you
use assembly, though. Lock everything the handler can possibly
touch... :)
I wouldn't recommend using C to write a handler that needs to be *fast*,
but it should be easily fast enough for a keyboard handler.
-- Yamaha / XYZZ "May farce the with be you."
mailto:scriven AT CS DOT ColoState DOT edu
mailto:scriven AT VIS DOT ColoState DOT edu
http://www.vis.colostate.edu/~scriven/
- Raw text -