HDWCFG


HDWCFG , BIOS. , :

HDWCFG (C)A. Frolov, 1997

Configuration word: C823

HDD present

NPU present

RAM banks: 0

Video Mode: 2

Nubber of FDD: 1

Nubber of COM ports: 2

Number of LPT ports: 3

RAM istalled: 640 Kbytes

Extended RAM istalled: 0

HDWCFG 1.1.

1.1. hdwcfg\hdwcfg.c

// =====================================================

//

// BIOS

//

// (C) ., 1997

//

// E-mail: frolov@glas.apc.org

// WWW: http://www.glasnet.ru/~frolov

//

// http://www.dials.ccas.ru/frolov

// =====================================================

#include <stdio.h>

#include <conio.h>

#include <memory.h>

#include <dos.h>

//

typedef struct _HDWCFG

{

unsigned HddPresent: 1; // 0

unsigned NpuPresent: 1; // 1

unsigned AmountOfRAM: 2; // 2-3

unsigned VideoMode: 2; // 4-5

unsigned NumberOfFdd: 2; // 6-7

unsigned DmaPresent: 1; // 8

unsigned NumberOfCom: 3; // 9-11

unsigned GamePresent: 1; // 12

unsigned JrComPresent: 1; // 13

unsigned NumberOfLpt: 2; // 14-15

} HDWCFG;

int main(void)

{

union REGS rg;

HDWCFG HdwCfg;

unsigned uword;

printf("\nHDWCFG (C)A. Frolov, 1997");

// INT 11h

//

rg.h.ah = 0x0;

int86(0x11, &rg, &rg);

//

// HdwCfg

uword = (unsigned int)rg.x.ax;

memcpy(&HdwCfg, &uword, 2);

//

printf("\n\nConfiguration word: %04.4X", HdwCfg);

if(HdwCfg.HddPresent)