Release 941017
[wine/gsoc-2012-control.git] / miscemu / int2f.c
blobe41fd5b6ab4f18fb6f2edeff6b9ea2c2dc388840
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "registers.h"
4 #include "wine.h"
5 #include "stddebug.h"
6 /* #define DEBUG_INT */
7 /* #undef DEBUG_INT */
8 #include "debug.h"
10 void IntBarf(int i, struct sigcontext_struct *context);
11 int do_int2f_16(struct sigcontext_struct *context);
13 int do_int2f(struct sigcontext_struct *context)
15 switch((context->sc_eax >> 8) & 0xff)
17 case 0x10: /* share is installed */
18 EAX = (EAX & 0xffffff00) | 0xff;
19 break;
21 case 0x15: /* mscdex */
22 /* ignore requests */
23 return 1;
25 case 0x16:
26 return do_int2f_16(context);
28 default:
29 IntBarf(0x2f, context);
31 return 1;
35 int do_int2f_16(struct sigcontext_struct *context)
37 switch(context->sc_eax & 0xff) {
38 case 0x00:
39 /* return 'major/minor' for MSWin 3.1 */
40 dprintf_int(stddeb,"do_int2f_16 // return 'major/minor' for MSWin 3.1 !\n");
41 context->sc_eax = 0x0310;
42 return 1;
43 case 0x86:
44 /* operating in protected mode under DPMI */
45 dprintf_int(stddeb,"do_int2f_16 // operating in protected mode under DPMI !\n");
46 context->sc_eax = 0x0000;
47 return 1;
48 case 0x87:
49 dprintf_int(stddeb,"do_int2f_16 // return DPMI flags !\n");
50 context->sc_eax = 0x0000; /* DPMI Installed */
51 context->sc_ebx = 0x0001; /* 32bits available */
52 context->sc_ecx = 0x04; /* processor 486 */
53 context->sc_edx = 0x0100; /* DPMI major/minor */
54 context->sc_esi = 0; /* # of para. of DOS */
55 /* extended private data */
56 return 1;
57 default:
58 IntBarf(0x2f, context);
60 return 1;