]> git.eshelyaron.com Git - emacs.git/commitdiff
(dos_rawgetc): Use bios, not kbhit ().
authorRichard M. Stallman <rms@gnu.org>
Mon, 11 Jul 1994 00:59:17 +0000 (00:59 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 11 Jul 1994 00:59:17 +0000 (00:59 +0000)
src/msdos.c

index 3ef68d0ccc9494916e4e91bea6abc7bcf7192843..6c72853143a957a4b8ce36ddfb0a72647ef49d9c 100644 (file)
@@ -265,7 +265,11 @@ dos_rawgetc ()
      characters like { and } if their positions are overlaid.  */
   alt_p = ((extended_kbd ? (regs.h.ah & 2) : (regs.h.al & 8)) != 0);
 
-  while (kbhit ())
+  /* The following condition is equivalent to `kbhit ()', except that
+     it uses the bios to do its job.  This pleases DESQview/X.  */
+  while ((regs.h.ah = extended_kbd ? 0x11 : 0x01),
+        int86 (0x16, &regs, &regs),
+        (regs.x.flags & 0x40) == 0)
     {
       union REGS regs;
       register unsigned char c;