_bios_equiplist

Description

Calls BIOS equipment-list service, using INT 0x11.

#include <bios.h>

unsigned _bios_equiplist( void );

Remarks

The _bios_equiplist routine uses INT 0x11 to determine what hardware and peripherals are currently installed on the machine.

Return Value

The function returns the AX value, which is a set of bits indicating what equipment is installed, as defined below:

Bits Meaning

0 True (1) if disk drive(s) installed
1 True (1) if math coprocessor installed
2–3 System RAM in 16K blocks (16–64K)
4–5 Initial video mode:
  00 = Reserved
  01 = 40 x 25 color
  10 = 80 x 25 color
  11 = 80 x 25 monochrome
6–7 Number of floppy-disk drives installed (00 =1, 01 = 2, etc.)
8 False (0) if and only if a Direct Memory Access (DMA) chip is installed
9–11 Number of RS232 serial ports installed
12 True (1) if and only if a game adapter is installed
13 True (1) if and only if an internal modem is installed
14–15 Number of printers installed

Compatibility

Standards:None

16-Bit:DOS, QWIN, WIN, WIN DLL

32-Bit:None

Example

/* BEQUIPLI.C: This program checks for the presence of diskettes. */

#include <bios.h>

#include <stdio.h>

void main( void )

{

unsigned equipment;

equipment = _bios_equiplist();

printf( "Equipment bits: 0x%.4x\n", equipment );

if( equipment & 0x1000 ) /* Check for game adapter bit */

printf( "Game adapter installed\n" );

else

printf( "No game adapter installed\n" );

}

Output

Equipment bits: 0x4061

No game adapter installed