We need to return the value stored in ah after reading from the
keyboard with __intcall(0x16, ...) otherwise we won't properly detect
function keys such as F1, F2, etc.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
/*
* getchar: Read a character from keyboard or serial port
*/
-char getchar(void)
+char getchar(char *hi)
{
com32sys_t ireg, oreg;
unsigned char data;
__intcall(0x16, &ireg, &oreg);
data = oreg.eax.b[0];
+ *hi = oreg.eax.b[1];
+
if (data == 0xE0)
data = 0;
void pm_getchar(com32sys_t *regs)
{
- regs->eax.b[0] = getchar();
+ regs->eax.b[0] = getchar(®s->eax.b[1]);
}
static void msg_setbg(char data)