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