Release 950817
[wine/multimedia.git] / miscemu / int2f.c
blob3a9cad4f7461e0aa5f5b336f8d5ef77633dae6c1
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 context )
21 switch(AH_reg(&context))
23 case 0x10:
24 AL_reg(&context) = 0xff; /* share is installed */
25 break;
27 case 0x15: /* mscdex */
28 /* ignore requests */
29 break;
31 case 0x16:
32 do_int2f_16( &context );
33 break;
34 default:
35 INT_BARF( &context, 0x2f );
40 static void do_int2f_16(struct sigcontext_struct *context)
42 switch(AL_reg(context))
44 case 0x00: /* Windows enhanced mode installation check */
45 AX_reg(context) = Options.enhanced ? WINVERSION : 0;
46 break;
48 case 0x0a: /* Get Windows version and type */
49 AX_reg(context) = 0;
50 BX_reg(context) = (WINVERSION >> 8) | ((WINVERSION << 8) & 0xff00);
51 CX_reg(context) = Options.enhanced ? 3 : 2;
52 break;
54 case 0x80: /* Release time-slice */
55 break; /* nothing to do */
57 case 0x86: /* DPMI detect mode */
58 AX_reg(context) = 0; /* Running under DPMI */
59 break;
61 case 0x87: /* DPMI installation check */
62 AX_reg(context) = 0x0000; /* DPMI Installed */
63 BX_reg(context) = 0x0001; /* 32bits available */
64 CL_reg(context) = 0x03; /* processor 386 */
65 DX_reg(context) = 0x005a; /* DPMI major/minor 0.90 */
66 SI_reg(context) = 0; /* # of para. of DOS extended private data */
67 ES_reg(context) = 0; /* ES:DI is DPMI switch entry point */
68 DI_reg(context) = 0;
69 break;
71 default:
72 INT_BARF( context, 0x2f );