diff --git a/src/dos/dev_con.h b/src/dos/dev_con.h index 5ce1bdc6..b7b8f0b9 100644 --- a/src/dos/dev_con.h +++ b/src/dos/dev_con.h @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dev_con.h,v 1.28 2007-01-11 18:08:54 c2woody Exp $ */ +/* $Id: dev_con.h,v 1.29 2007-04-16 12:23:23 c2woody Exp $ */ #include "dos_inc.h" #include "../ints/int10.h" @@ -370,7 +370,7 @@ Bit16u device_CON::GetInformation(void) { Bit16u tail=mem_readw(BIOS_KEYBOARD_BUFFER_TAIL); if ((head==tail) && !readcache) return 0x80D3; /* No Key Available */ - if (real_readw(0x40,head)) return 0x8093; /* Key Available */ + if (readcache || real_readw(0x40,head)) return 0x8093; /* Key Available */ /* remove the zero from keyboard buffer */ Bit16u start=mem_readw(BIOS_KEYBOARD_BUFFER_START); diff --git a/src/dos/dos.cpp b/src/dos/dos.cpp index 98237bec..5cc538ce 100644 --- a/src/dos/dos.cpp +++ b/src/dos/dos.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos.cpp,v 1.99 2007-01-13 08:35:49 qbix79 Exp $ */ +/* $Id: dos.cpp,v 1.100 2007-04-16 12:23:23 c2woody Exp $ */ #include #include @@ -191,14 +191,12 @@ static Bitu DOS_21Handler(void) { break; case 0x0c: /* Flush Buffer and read STDIN call */ { + /* flush STDIN-buffer */ + Bit8u c;Bit16u n; + while (DOS_GetSTDINStatus()) { + n=1; DOS_ReadFile(STDIN,&c,&n); + } switch (reg_al) { - case 0x0: - /* flush STDIN-buffer */ - Bit8u c;Bit16u n; - while (DOS_GetSTDINStatus()) { - n=1; DOS_ReadFile(STDIN,&c,&n); - } - break; case 0x1: case 0x6: case 0x7: @@ -213,6 +211,7 @@ static Bitu DOS_21Handler(void) { break; default: // LOG_ERROR("DOS:0C:Illegal Flush STDIN Buffer call %d",reg_al); + reg_al=0; break; } }