2 * BIOS interrupt 11h handler
14 #include "debugtools.h"
17 /**********************************************************************
18 * INT_Int11Handler (WPROCS.117)
20 * Handler for int 11h (get equipment list).
22 void WINAPI INT_Int11Handler( CONTEXT86 *context )
25 int parallelports = 0;
29 /* borrowed from Ralph Brown's interrupt lists
31 bits 15-14: number of parallel devices
32 bit 13: [Conv] Internal modem
34 bits 11- 9: number of serial devices
36 bits 7- 6: number of diskette drives minus one
37 bits 5- 4: Initial video mode:
43 bit 2: [PS] =1 if pointing device
45 bit 1: =1 if math co-processor
46 bit 0: =1 if diskette available for boot
48 /* Currently the only of these bits correctly set are:
49 bits 15-14 } Added by William Owen Smith,
50 bits 11-9 } wos@dcs.warwick.ac.uk
55 if (GetDriveTypeA("A:\\") == DRIVE_REMOVABLE) diskdrives++;
56 if (GetDriveTypeA("B:\\") == DRIVE_REMOVABLE) diskdrives++;
57 if (diskdrives) diskdrives--;
61 char temp[16],name[16];
63 sprintf(name,"COM%d",x+1);
64 PROFILE_GetWineIniString("serialports",name,"*",temp,sizeof temp);
68 sprintf(name,"LPT%d",x+1);
69 PROFILE_GetWineIniString("parallelports",name,"*",temp,sizeof temp);
73 if (serialports > 7) /* 3 bits -- maximum value = 7 */
75 if (parallelports > 3) /* 2 bits -- maximum value = 3 */
78 AX_reg(context) = (diskdrives << 6) | (serialports << 9) |
79 (parallelports << 14) | 0x02;