Date: Wed, 25 Dec 1996 20:16:27 +0100 (MET) Message-Id: <1.5.4.16.19961225201653.222fac74@nethosting.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: djgpp AT delorie DOT com From: Andreas Vernersson Subject: Re: Reading the keyboard Cc: T DOT Harte AT btinternet DOT com At 20:00 1996-12-24 GMT, Thomas Harte 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