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 0x12: /* realtime compression interface */
44 break; /* not installed */
46 INT_BARF( &context
, 0x2f );
50 INT_BARF( &context
, 0x2f );
56 /**********************************************************************
59 static void do_int2f_16(struct sigcontext_struct
*context
)
63 switch(AL_reg(context
))
65 case 0x00: /* Windows enhanced mode installation check */
66 AX_reg(context
) = Options
.enhanced
? WINVERSION
: 0;
69 case 0x0a: /* Get Windows version and type */
71 BX_reg(context
) = (WINVERSION
>> 8) | ((WINVERSION
<< 8) & 0xff00);
72 CX_reg(context
) = Options
.enhanced
? 3 : 2;
75 case 0x80: /* Release time-slice */
77 /* FIXME: We need to do something that lets some other process run
82 case 0x83: /* Return Current Virtual Machine ID */
83 /* Virtual Machines are usually created/destroyed when Windows runs
84 * DOS programs. Since we never do, we are always in the System VM.
85 * According to Ralf Brown's Interrupt List, never return 0. But it
86 * seems to work okay (returning 0), just to be sure we return 1.
88 BX_reg(context
) = 1; /* VM 1 is probably the System VM */
91 case 0x84: /* Get device API entry point */
92 addr
= MODULE_GetEntryPoint( GetModuleHandle("WINPROCS"),
93 VXD_BASE
+ BX_reg(context
) );
94 if (!addr
) /* not supported */
96 fprintf( stderr
,"Application attempted to access VxD %04x\n",
98 fprintf( stderr
,"This device is not known to Wine.");
99 fprintf( stderr
,"Expect a failure now\n");
101 ES_reg(context
) = SELECTOROF(addr
);
102 DI_reg(context
) = OFFSETOF(addr
);
105 case 0x86: /* DPMI detect mode */
106 AX_reg(context
) = 0; /* Running under DPMI */
109 /* FIXME: is this right? Specs say that this should only be callable
110 in real (v86) mode which we never enter. */
111 case 0x87: /* DPMI installation check */
112 AX_reg(context
) = 0x0000; /* DPMI Installed */
113 BX_reg(context
) = 0x0001; /* 32bits available */
114 CL_reg(context
) = runtime_cpu();
115 DX_reg(context
) = 0x005a; /* DPMI major/minor 0.90 */
116 SI_reg(context
) = 0; /* # of para. of DOS extended private data */
117 ES_reg(context
) = 0; /* ES:DI is DPMI switch entry point */
121 case 0x8a: /* DPMI get vendor-specific API entry point. */
122 /* The 1.0 specs say this should work with all 0.9 hosts. */
126 INT_BARF( context
, 0x2f );