I use DJGPP and ive installed a Keyboard ISR.
everything works fine.
The only Problem is, that when i quit the Program, all the Keypresses that i did (during program execution) show up on the Dos promt.
Is there a way to clear the Buffer at the End of the Game or not have it record keypresses in the first place ?
Or rather, what is the usual way of doing that ?
There is a ring buffer somewhere in the BIOS area, whose head and tail positions can be set. I forgot the details. But how does your application handle keyboard input? Does it handle int 9 itself? If it does it on its own, then there should be no need to call the original int 9 handler, thus nothing would end up in the keyboard buffer.
I guess you just need to change "chain" to "set" in the function name. Of course your handler may need to be different if it doesn't chain, e.g. acknowledging the keyboard IRQ.