Send HDN_ITEMCHANGING and HDN_ITEMCHANGED when resizing.
[wine/multimedia.git] / msdos / int11.c
blobd3179998431495e1a737a1de6580bea08880861c
1 /*
2 * BIOS interrupt 11h handler
3 */
5 #include <stdlib.h>
6 #include "windows.h"
7 #include "miscemu.h"
8 #include "msdos.h"
9 #include "drive.h"
10 #include "debugtools.h"
11 #include "options.h"
13 /**********************************************************************
14 * INT_Int11Handler
16 * Handler for int 11h (get equipment list).
18 void WINAPI INT_Int11Handler( CONTEXT86 *context )
20 int diskdrives = 0;
21 int parallelports = 0;
22 int serialports = 0;
23 int x;
25 /* borrowed from Ralph Brown's interrupt lists
27 bits 15-14: number of parallel devices
28 bit 13: [Conv] Internal modem
29 bit 12: reserved
30 bits 11- 9: number of serial devices
31 bit 8: reserved
32 bits 7- 6: number of diskette drives minus one
33 bits 5- 4: Initial video mode:
34 00b = EGA,VGA,PGA
35 01b = 40 x 25 color
36 10b = 80 x 25 color
37 11b = 80 x 25 mono
38 bit 3: reserved
39 bit 2: [PS] =1 if pointing device
40 [non-PS] reserved
41 bit 1: =1 if math co-processor
42 bit 0: =1 if diskette available for boot
44 /* Currently the only of these bits correctly set are:
45 bits 15-14 } Added by William Owen Smith,
46 bits 11-9 } wos@dcs.warwick.ac.uk
47 bits 7-6
48 bit 2 (always set)
51 if (DRIVE_IsValid(0)) diskdrives++;
52 if (DRIVE_IsValid(1)) diskdrives++;
53 if (diskdrives) diskdrives--;
55 for (x=0; x < 9; x++)
57 char temp[16],name[16];
59 wsprintfA(name,"COM%d",x+1);
60 PROFILE_GetWineIniString("serialports",name,"*",temp,sizeof temp);
61 if(strcmp(temp,"*"))
62 serialports++;
64 wsprintfA(name,"LPT%d",x+1);
65 PROFILE_GetWineIniString("parallelports",name,"*",temp,sizeof temp);
66 if(strcmp(temp,"*"))
67 parallelports++;
69 if (serialports > 7) /* 3 bits -- maximum value = 7 */
70 serialports=7;
71 if (parallelports > 3) /* 2 bits -- maximum value = 3 */
72 parallelports=3;
74 AX_reg(context) = (diskdrives << 6) | (serialports << 9) |
75 (parallelports << 14) | 0x02;