Mail Archives: djgpp/1996/12/25/14:39:02
At 20:00 1996-12-24 GMT, Thomas Harte <T DOT Harte AT btinternet DOT com> wrote:
> Who knows the best way to read a keyboard on an IBM PC, under DJGPP for
>use in a game situation - that is so that multiple key presses can be
>detected?
Probably by hooking interrupt $9, and reading port $60 which if the key is
released the 8th bit of the byte is set, and othervise not. Then and having
a list of flags that indicates which keys are down. And the interrupt=
shouldn't
call the old interrupt which are a waste, because the new can the essential
stuff like:
- Reading port $61, OR:ing (binary) by $80, and writing this value to port=
$61
- AND:ing (binary) that value by $7F and writing this value to port $61
- Reading port $20, and writing this value to port $20
(that how i made my keyboardhandler)
/andreas vernersson - ume=E5,sweden - hubb AT freenet DOT hut DOT fi - IRC:hubble=20
- Raw text -