2 * BIOS interrupt 11h handler
13 #include "debugtools.h"
16 /**********************************************************************
17 * INT_Int11Handler (WPROCS.117)
19 * Handler for int 11h (get equipment list).
21 void WINAPI
INT_Int11Handler( CONTEXT86
*context
)
24 int parallelports
= 0;
28 /* borrowed from Ralph Brown's interrupt lists
30 bits 15-14: number of parallel devices
31 bit 13: [Conv] Internal modem
33 bits 11- 9: number of serial devices
35 bits 7- 6: number of diskette drives minus one
36 bits 5- 4: Initial video mode:
42 bit 2: [PS] =1 if pointing device
44 bit 1: =1 if math co-processor
45 bit 0: =1 if diskette available for boot
47 /* Currently the only of these bits correctly set are:
48 bits 15-14 } Added by William Owen Smith,
49 bits 11-9 } wos@dcs.warwick.ac.uk
54 if (GetDriveTypeA("A:\\") == DRIVE_REMOVABLE
) diskdrives
++;
55 if (GetDriveTypeA("B:\\") == DRIVE_REMOVABLE
) diskdrives
++;
56 if (diskdrives
) diskdrives
--;
60 char temp
[16],name
[16];
62 sprintf(name
,"COM%d",x
+1);
63 PROFILE_GetWineIniString("serialports",name
,"*",temp
,sizeof temp
);
67 sprintf(name
,"LPT%d",x
+1);
68 PROFILE_GetWineIniString("parallelports",name
,"*",temp
,sizeof temp
);
72 if (serialports
> 7) /* 3 bits -- maximum value = 7 */
74 if (parallelports
> 3) /* 2 bits -- maximum value = 3 */
77 AX_reg(context
) = (diskdrives
<< 6) | (serialports
<< 9) |
78 (parallelports
<< 14) | 0x02;