biosequip
Checks equipment.
Defined in header <bios.h>
Syntax
#include <bios.h>
int biosequip(void);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
biosequip 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
pushed to see four;
ports
the IBM PS/2 can
001 = 1 port
see up to eight.
010 = 2 ports Oil =3 ports 100 = 4 ports 101 = 5 ports 110 = 6 ports 111 = 7 ports
| Bit 8 | 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
| Bit 1 | Floating-point coprocessor |
| Bit 0 | Boot from disk ' |
Example
iinclude <stdio.h>
#include <bios.h>
Mefine CO_PROCESSOR_MASK 0x0002
int main(void)
int equip_check;
/* get the current equipment configuration */
equip_check - biosequip ();
/* check to see if there is a coprocessor installed */
if (equip_check & CO_PROCESSOR_MASK)
printf("There is a math coprocessor installed.\n");
else
printfC'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/biosequip/
· short form /3.1/biosequip/