Release 950620
[wine] / miscemu / int10.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "registers.h"
4 #include "wine.h"
5 #include "miscemu.h"
6 #include "stddebug.h"
7 /* #define DEBUG_INT */
8 #include "debug.h"
9
10 void IntBarf(int i, struct sigcontext_struct *context)
11 {
12         dprintf_int(stddeb, "int%x: unknown/not implemented parameters:\n", i);
13         dprintf_int(stddeb, "int%x: AX %04x, BX %04x, CX %04x, DX %04x, "
14                "SI %04x, DI %04x, DS %04x, ES %04x\n",
15                i, AX, BX, CX, DX, SI, DI, DS, ES);
16 }
17
18 int do_int10(struct sigcontext_struct *context)
19 {
20         dprintf_int(stddeb,"int10: AX %04x, BX %04x, CX %04x, DX %04x, "
21                "SI %04x, DI %04x, DS %04x, ES %04x\n",
22                AX, BX, CX, DX, SI, DI, DS, ES);
23
24         switch(AH) {
25         case 0x0f:
26                 AL = 0x5b;
27                 break;
28
29         case 0x12:
30                 if (BL == 0x10) {
31                         BX = 0x0003;
32                         CX = 0x0009;
33                 }
34                 break;
35                         
36         case 0x1a:
37                 BX = 0x0008;
38                 break;
39
40         default:
41                 IntBarf(0x10, context);
42         };
43         return 1;
44 }