views:

260

answers:

1

I need to make an animation which will accelerate when the user keeps a key pressed, and return to normal speed when the key is released. I can't "wait" for the user to enter a key like most DOS and BIOS interrupts do, since it'll stop the animation.

I tried to use option 01H INT 16H, which works without pausing the program, but it doesn't clear the keyboard buffer either; thus the animation will stay accelerated even if the key is released, since the key stays in the buffer.

I'm thinking that if I can access the keyboard buffer's memory location manually I can retrieve and erase it myself. But sadly I don't know how to do this. Any help would be greatly appreciated.

+1  A: 

use port 060h, get the key press & release status there

Michael Buen