2 * BIOS interrupt 11h handler
12 #include "debugtools.h"
15 /**********************************************************************
18 * Handler for int 11h (get equipment list).
20 void WINAPI
INT_Int11Handler( CONTEXT86
*context
)
23 int parallelports
= 0;
27 /* borrowed from Ralph Brown's interrupt lists
29 bits 15-14: number of parallel devices
30 bit 13: [Conv] Internal modem
32 bits 11- 9: number of serial devices
34 bits 7- 6: number of diskette drives minus one
35 bits 5- 4: Initial video mode:
41 bit 2: [PS] =1 if pointing device
43 bit 1: =1 if math co-processor
44 bit 0: =1 if diskette available for boot
46 /* Currently the only of these bits correctly set are:
47 bits 15-14 } Added by William Owen Smith,
48 bits 11-9 } wos@dcs.warwick.ac.uk
53 if (DRIVE_IsValid(0)) diskdrives
++;
54 if (DRIVE_IsValid(1)) diskdrives
++;
55 if (diskdrives
) diskdrives
--;
59 char temp
[16],name
[16];
61 wsprintfA(name
,"COM%d",x
+1);
62 PROFILE_GetWineIniString("serialports",name
,"*",temp
,sizeof temp
);
66 wsprintfA(name
,"LPT%d",x
+1);
67 PROFILE_GetWineIniString("parallelports",name
,"*",temp
,sizeof temp
);
71 if (serialports
> 7) /* 3 bits -- maximum value = 7 */
73 if (parallelports
> 3) /* 2 bits -- maximum value = 3 */
76 AX_reg(context
) = (diskdrives
<< 6) | (serialports
<< 9) |
77 (parallelports
<< 14) | 0x02;