Release 940804
[wine/gsoc-2012-control.git] / miscemu / int2f.c
blobc652bba689a5eb207dc63286ab3bfab448a4656a
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "msdos.h"
4 #include "wine.h"
6 int do_int2f_16(struct sigcontext_struct *context);
9 int do_int2f(struct sigcontext_struct *context)
11 switch((context->sc_eax >> 8) & 0xff)
13 case 0x10: /* share isn't installed */
14 EAX = (EAX & 0xffffff00) | 0x01;
15 break;
17 case 0x15: /* mscdex */
18 /* ignore requests */
19 return 1;
21 case 0x16:
22 return do_int2f_16(context);
24 default:
25 IntBarf(0x2f, context);
27 return 1;
31 int do_int2f_16(struct sigcontext_struct *context)
33 switch(context->sc_eax & 0xff) {
34 case 0x00:
35 /* return 'major/minor' for MSWin 3.1 */
36 printf("do_int2f_16 // return 'major/minor' for MSWin 3.1 !\n");
37 context->sc_eax = 0x0310;
38 return 1;
39 case 0x86:
40 /* operating in protected mode under DPMI */
41 printf("do_int2f_16 // operating in protected mode under DPMI !\n");
42 context->sc_eax = 0x0000;
43 return 1;
44 case 0x87:
45 printf("do_int2f_16 // return DPMI flags !\n");
46 context->sc_eax = 0x0000; /* DPMI Installed */
47 context->sc_ebx = 0x0001; /* 32bits available */
48 context->sc_ecx = 0x04; /* processor 486 */
49 context->sc_edx = 0x0100; /* DPMI major/minor */
50 context->sc_esi = 0; /* # of para. of DOS */
51 /* extended private data */
52 return 1;
53 default:
54 IntBarf(0x2f, context);
56 return 1;