11 /* #define DEBUG_INT */
14 /* base WINPROC module number for VxDs */
17 static void do_int2f_16(struct sigcontext_struct
*context
);
19 /**********************************************************************
22 * Handler for int 2fh (multiplex).
24 void INT_Int2fHandler( struct sigcontext_struct context
)
26 switch(AH_reg(&context
))
29 AL_reg(&context
) = 0xff; /* share is installed */
32 case 0x15: /* mscdex */
37 do_int2f_16( &context
);
41 switch(AL_reg(&context
))
43 case 0x10: /* smartdrv */
44 break; /* not installed */
45 case 0x12: /* realtime compression interface */
46 break; /* not installed */
48 INT_BARF( &context
, 0x2f );
52 INT_BARF( &context
, 0x2f );
58 /**********************************************************************
61 static void do_int2f_16(struct sigcontext_struct
*context
)
65 switch(AL_reg(context
))
67 case 0x00: /* Windows enhanced mode installation check */
68 AX_reg(context
) = Options
.enhanced
? WINVERSION
: 0;
71 case 0x0a: /* Get Windows version and type */
73 BX_reg(context
) = (WINVERSION
>> 8) | ((WINVERSION
<< 8) & 0xff00);
74 CX_reg(context
) = Options
.enhanced
? 3 : 2;
77 case 0x80: /* Release time-slice */
79 /* FIXME: We need to do something that lets some other process run
84 case 0x83: /* Return Current Virtual Machine ID */
85 /* Virtual Machines are usually created/destroyed when Windows runs
86 * DOS programs. Since we never do, we are always in the System VM.
87 * According to Ralf Brown's Interrupt List, never return 0. But it
88 * seems to work okay (returning 0), just to be sure we return 1.
90 BX_reg(context
) = 1; /* VM 1 is probably the System VM */
93 case 0x84: /* Get device API entry point */
94 addr
= MODULE_GetEntryPoint( GetModuleHandle("WINPROCS"),
95 VXD_BASE
+ BX_reg(context
) );
96 if (!addr
) /* not supported */
98 fprintf( stderr
,"Application attempted to access VxD %04x\n",
100 fprintf( stderr
,"This device is not known to Wine.");
101 fprintf( stderr
,"Expect a failure now\n");
103 ES_reg(context
) = SELECTOROF(addr
);
104 DI_reg(context
) = OFFSETOF(addr
);
107 case 0x86: /* DPMI detect mode */
108 AX_reg(context
) = 0; /* Running under DPMI */
111 /* FIXME: is this right? Specs say that this should only be callable
112 in real (v86) mode which we never enter. */
113 case 0x87: /* DPMI installation check */
114 AX_reg(context
) = 0x0000; /* DPMI Installed */
115 BX_reg(context
) = 0x0001; /* 32bits available */
116 CL_reg(context
) = runtime_cpu();
117 DX_reg(context
) = 0x005a; /* DPMI major/minor 0.90 */
118 SI_reg(context
) = 0; /* # of para. of DOS extended private data */
119 ES_reg(context
) = 0; /* ES:DI is DPMI switch entry point */
123 case 0x8a: /* DPMI get vendor-specific API entry point. */
124 /* The 1.0 specs say this should work with all 0.9 hosts. */
128 INT_BARF( context
, 0x2f );