2 * BIOS interrupt 11h handler
4 * Copyright 1996 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 #include "wine/debug.h"
33 /**********************************************************************
34 * INT_Int11Handler (WPROCS.117)
36 * Handler for int 11h (get equipment list).
38 void WINAPI INT_Int11Handler( CONTEXT86 *context )
41 int parallelports = 0;
45 /* borrowed from Ralph Brown's interrupt lists
47 bits 15-14: number of parallel devices
48 bit 13: [Conv] Internal modem
50 bits 11- 9: number of serial devices
52 bits 7- 6: number of diskette drives minus one
53 bits 5- 4: Initial video mode:
59 bit 2: [PS] =1 if pointing device
61 bit 1: =1 if math co-processor
62 bit 0: =1 if diskette available for boot
64 /* Currently the only of these bits correctly set are:
65 bits 15-14 } Added by William Owen Smith,
66 bits 11-9 } wos@dcs.warwick.ac.uk
71 if (GetDriveTypeA("A:\\") == DRIVE_REMOVABLE) diskdrives++;
72 if (GetDriveTypeA("B:\\") == DRIVE_REMOVABLE) diskdrives++;
73 if (diskdrives) diskdrives--;
77 char temp[16],name[16];
79 sprintf(name,"COM%d",x+1);
80 PROFILE_GetWineIniString("serialports",name,"*",temp,sizeof temp);
84 sprintf(name,"LPT%d",x+1);
85 PROFILE_GetWineIniString("parallelports",name,"*",temp,sizeof temp);
89 if (serialports > 7) /* 3 bits -- maximum value = 7 */
91 if (parallelports > 3) /* 2 bits -- maximum value = 3 */
94 AX_reg(context) = (diskdrives << 6) | (serialports << 9) |
95 (parallelports << 14) | 0x02;