_bios_equiplist
raw OCR
Checks equipment.
Defined in header <bios.h>
Syntax
#include <bios.h>
unsigned _bios_equiplist(void);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
_bios_equiplist uses BIOS interrupt 0x11 to return an integer describing the equipment connected to the system.
Return value
The return value is interpreted as a collection of bit-sized fields. The IBM PC values follow:
| Bits 14-15 | Number of parallel printers installed 00 = 0 printers 01 = 1 printer 10 = 2 printers 11=3 printers |
| Bit 13 | Serial printer attached |
| Bit 12 | Game I/O attached |
DOS only sees two
| Bits 9-11 | Number of COM ports |
ports but can be
000 = 0 ports
pushed to see four;
001 = 1 port
the IBM PS/2 can
010 = 2 ports
see up to eight.
Oil =3 ports 100 = 4 ports 101 = 5 ports 110 = 6 ports 111 =7 ports
| Bits | Direct memory access (DMA) 0 = Machine has DMA 1 = Machine does not have DMA; for example, PC Jr. |
| Bits 6-7 | Number of disk drives 00 = 1 drive 01 = 2 drives 10 = 3 drives 11=4 drives, only if bit 0 is 1 |
| Bit 4-5 | Initial video mode 00 = Unused 01 = 40x25 BW with color card 10 = 80x25 BW with color card 11 = 80x25 BW with mono card |
| Bits 2-3 | Motherboard RAM size 00 = 16K 01 = 32K 10 = 48K 11 = 64K |
| Biti | Hoating-point coprocessor |
| BitO | Boot from disk |
Example
#include <stdio.h>
#include <bios.h>
ttdefine CO PROCESSOR MASK 0x0002
int main(void)
{
unsigned equip_check;
/* Get the current equipment configuration. */
equip_check = _bios_equiplist ();
/* Check to see if there is a coprocessor installed. */
if (equip_check & CO_PROCESSOR_MASK)
printf("There is a math coprocessor installed.\n");
else
printf("No math coprocessor installed.\n");
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/bios.h/_bios_equiplist/
· short form /3.1/_bios_equiplist/