DOS/INT21/function 0C implementation

Jukka Heinonen jhei at iki.fi
Sun May 5 03:24:07 CDT 2002


Interrupt 21 function 0C was handled in protected
mode interrupt handler but it must also be handled
in real mode.

Changelog:
  Real mode interrupt handler now handles
  interrupt 21 function 0C.

Index: dlls/winedos/int21.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/int21.c,v
retrieving revision 1.7
diff -u -r1.7 int21.c
--- dlls/winedos/int21.c        11 Apr 2002 21:50:16 -0000      1.7
+++ dlls/winedos/int21.c        5 May 2002 08:15:02 -0000
@@ -76,6 +76,22 @@
 {
     RESET_CFLAG(context);  /* Not sure if this is a good idea */
 
+    if(AH_reg(context) == 0x0c) /* FLUSH BUFFER AND READ STANDARD INPUT */
+    {
+        BYTE al = AL_reg(context); /* Input function to execute after flush. */
+
+        /* FIXME: buffers are not flushed */
+
+        /*
+         * If AL is not one of 0x01, 0x06, 0x07, 0x08, or 0x0a, 
+         * the buffer is flushed but no input is attempted.
+         */
+        if(al != 0x01 && al != 0x06 && al != 0x07 && al != 0x08 && al != 0x0a)
+            return;
+      
+        AH_reg(context) = al;
+    }
+
     switch(AH_reg(context))
     {
     case 0x00: /* TERMINATE PROGRAM */


-- 
Jukka Heinonen <http://www.iki.fi/jhei/>



More information about the wine-patches mailing list