Simplify the "is a character ready" test, so that we don't return a false

negative for keypresses with zero ascii values.  This is in line with the
comconsole test, rather than being more ambitious.

Submitted by:	rnordier
This commit is contained in:
Mike Smith 1998-10-28 19:24:15 +00:00
parent b8e9aae97b
commit 8879e57b3e

View File

@ -26,7 +26,7 @@
* *
* From Id: probe_keyboard.c,v 1.13 1997/06/09 05:10:55 bde Exp * From Id: probe_keyboard.c,v 1.13 1997/06/09 05:10:55 bde Exp
* *
* $Id: vidconsole.c,v 1.5 1998/10/07 07:34:31 msmith Exp $ * $Id: vidconsole.c,v 1.6 1998/10/11 10:07:52 peter Exp $
*/ */
#include <stand.h> #include <stand.h>
@ -120,9 +120,7 @@ vidc_ischar(void)
v86.addr = 0x16; v86.addr = 0x16;
v86.eax = 0x100; v86.eax = 0x100;
v86int(); v86int();
if (!(v86.efl & PSL_Z)) return(!(v86.efl & PSL_Z));
return(v86.eax & 0xff);
return(0);
} }
#if KEYBOARD_PROBE #if KEYBOARD_PROBE