Release 950727
[wine/multimedia.git] / miscemu / int2f.c
blob88bd229c3703a3aea5f090c2d1258946646c35f9
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 static void do_int2f_16(struct sigcontext_struct *context);
14 /**********************************************************************
15 * INT_Int2fHandler
17 * Handler for int 2fh (multiplex).
19 void INT_Int2fHandler( struct sigcontext_struct sigcontext )
21 #define context (&sigcontext)
22 switch(AH)
24 case 0x10:
25 AL = 0xff; /* share is installed */
26 break;
28 case 0x15: /* mscdex */
29 /* ignore requests */
30 break;
32 case 0x16:
33 do_int2f_16( context );
34 break;
35 default:
36 INT_BARF( 0x2f );
38 #undef context
42 static void do_int2f_16(struct sigcontext_struct *context)
44 switch(AL)
46 case 0x00: /* Windows enhanced mode installation check */
47 AX = Options.enhanced ? WINVERSION : 0;
48 break;
50 case 0x0a: /* Get Windows version and type */
51 AX = 0;
52 BX = (WINVERSION >> 8) | ((WINVERSION << 8) & 0xff00);
53 CX = Options.enhanced ? 3 : 2;
54 break;
56 case 0x80: /* Release time-slice */
57 break; /* nothing to do */
59 case 0x86: /* DPMI detect mode */
60 AX = 0; /* Running under DPMI */
61 break;
63 case 0x87: /* DPMI installation check */
64 AX = 0x0000; /* DPMI Installed */
65 BX = 0x0001; /* 32bits available */
66 CL = 0x03; /* processor 386 */
67 DX = 0x005a; /* DPMI major/minor 0.90 */
68 SI = 0; /* # of para. of DOS extended private data */
69 ES = 0; /* ES:DI is DPMI switch entry point */
70 DI = 0;
71 break;
73 default:
74 INT_BARF( 0x2f );