Release 950620
[wine/multimedia.git] / miscemu / int2f.c
blobad797d13111207f9ce222a294374cae2bc1d6784
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "registers.h"
4 #include "wine.h"
5 #include "msdos.h"
6 #include "miscemu.h"
7 #include "options.h"
8 #include "stddebug.h"
9 /* #define DEBUG_INT */
10 #include "debug.h"
12 int do_int2f_16(struct sigcontext_struct *context);
14 int do_int2f(struct sigcontext_struct *context)
16 dprintf_int(stddeb,"int2f: AX %04x, BX %04x, CX %04x, DX %04x, "
17 "SI %04x, DI %04x, DS %04x, ES %04x\n",
18 AX, BX, CX, DX, SI, DI, DS, ES);
20 switch(AH)
22 case 0x10:
23 AL = 0xff; /* share is installed */
24 break;
26 case 0x15: /* mscdex */
27 /* ignore requests */
28 return 1;
30 case 0x16:
31 return do_int2f_16(context);
33 default:
34 IntBarf(0x2f, context);
36 return 1;
40 int do_int2f_16(struct sigcontext_struct *context)
42 switch(AL)
44 case 0x00: /* Windows enhanced mode installation check */
45 AX = Options.enhanced ? WINVERSION : 0;
46 break;
48 case 0x0a: /* Get Windows version and type */
49 AX = 0;
50 BX = (WINVERSION >> 8) | ((WINVERSION << 8) & 0xff00);
51 CX = Options.enhanced ? 3 : 2;
52 break;
54 case 0x86: /* DPMI detect mode */
55 AX = 0; /* Running under DPMI */
56 break;
58 case 0x87: /* DPMI installation check */
59 AX = 0x0000; /* DPMI Installed */
60 BX = 0x0001; /* 32bits available */
61 CX = 0x04; /* processor 486 */
62 DX = 0x0009; /* DPMI major/minor 0.9 */
63 SI = 0; /* # of para. of DOS extended private data */
64 ES = 0; /* ES:DI is DPMI switch entry point */
65 DI = 0;
66 break;
68 default:
69 IntBarf(0x2f, context);
71 return 1;