Fixed CHECK_STRING display.
[wine/multimedia.git] / msdos / int16.c
blob02ea9e8ffa7828eb17655f6acf0f86c671c742e5
1 /*
2 * DOS interrupt 16h handler
3 */
5 #include <stdlib.h>
6 #include <string.h>
7 #include <unistd.h>
9 #include "config.h"
10 #include "debug.h"
12 #include "ldt.h"
13 #include "drive.h"
14 #include "msdos.h"
15 #include "miscemu.h"
16 #include "module.h"
17 #include "console.h"
19 /**********************************************************************
20 * INT_Int16Handler
22 * Handler for int 16h (keyboard)
24 * NOTE:
26 * KEYB.COM (DOS >3.2) adds functions to this interrupt, they are
27 * not currently listed here.
30 void WINAPI INT_Int16Handler( CONTEXT *context )
32 switch AH_reg(context) {
34 case 0x00: /* Get Keystroke */
35 /* Returns: AH = Scan code
36 AL = ASCII character */
37 TRACE(int16, "Get Keystroke\n");
38 CONSOLE_GetKeystroke(&AH_reg(context), &AL_reg(context));
39 break;
41 case 0x01: /* Check for Keystroke */
42 /* Returns: ZF set if no keystroke */
43 /* AH = Scan code */
44 /* AL = ASCII character */
45 TRACE(int16, "Check for Keystroke\n");
46 if (!CONSOLE_CheckForKeystroke(&AH_reg(context), &AL_reg(context)))
48 SET_ZFLAG(context);
50 else
52 RESET_ZFLAG(context);
54 break;
56 case 0x02: /* Get Shift Flags */
57 FIXME(int16, "Get Shift Flags - Not Supported\n");
58 break;
60 case 0x03: /* Set Typematic Rate and Delay */
61 FIXME(int16, "Set Typematic Rate and Delay - Not Supported\n");
62 break;
64 case 0x09: /* Get Keyboard Functionality */
65 FIXME(int16, "Get Keyboard Functionality - Not Supported\n");
66 /* As a temporary measure, say that "nothing" is supported... */
67 AL_reg(context) = 0;
68 break;
70 case 0x0a: /* Get Keyboard ID */
71 FIXME(int16, "Get Keyboard ID - Not Supported\n");
72 break;
74 case 0x10: /* Get Enhanced Keystroke */
75 FIXME(int16, "Get Enhanced Keystroke - Not Supported\n");
76 break;
78 case 0x11: /* Check for Enhanced Keystroke */
79 FIXME(int16, "Check for Enhanced Keystroke - Not Supported\n");
80 break;
82 case 0x12: /* Get Extended Shift States */
83 FIXME(int16, "Get Extended Shift States - Not Supported\n");
84 break;
86 default:
87 FIXME(int16, "Unknown INT 16 function - 0x%x\n", AH_reg(context));
88 break;