BIOSINFO


BIOSINFO BIOS, , C0h BIOS INT15h:

BIOSINFO (C)A. Frolov, 1997

BIOS data: 04/18/97

BIOSINFO address: 0212:0190

BIOSINFO Size: 8

Model: FC

SubModel: 1

BIOS Revision: 0

Hardvare Cfg: 70

Reserved1: 00

Reserved2: 00

Hardware configuration

----------------------



Second IRQ Controller 8259

Real Time Clock

Used function 4Fh INT 15h

ISA Bus installed

1.2.

1.2. biosinfo\biosinfo.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 <dos.h>

// BIOS

typedef struct _BIOSINFO

{

int nSize; //

unsigned char bModel; //

unsigned char bSubModel; //

unsigned char bBIOSRevision; //

// BIOS

unsigned char bHardwareCfg; //

int reserved1; //

int reserved2; //

} BIOSINFO;

int main(void)

{

union REGS rg;

struct SREGS srg;

int i;

BIOSINFO far *lpbi;

void far* lp;

unsigned char bHdwCfg;

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

//

// BIOS. F000h:FFF5h

_FP_SEG(lp) = 0xf000;

_FP_OFF(lp) = 0xfff5;

//


printf("\n\nBIOS data: ");

for(i=0; i<8; i++)

putch(*((char far *)lp + i));

// C0h

// .

rg.h.ah = 0xc0;

int86x(0x15, &rg, &rg, &srg);

// BIOS ,

//

// F000h:FFFEh

if(rg.x.cflag == 1)

{

printf("\nFunction C0h INT 15h not supported\n");

// 蠠

_FP_SEG(lp) = 0xf000;

_FP_OFF(lp) = 0xfffe;

//

printf("\nModel: %02.2X",

(unsigned char)(*(char far *)lp));

return(-1);

}



//

// BIOS

_FP_SEG(lpbi) = srg.es;

_FP_OFF(lpbi) = rg.x.bx;

//

printf("\nBIOSINFO address: %Fp"

"\nBIOSINFO Size: %d"

"\nModel: %02.2X"

"\nSubModel: %d"

"\nBIOS Revision: %d"

"\nHardvare Cfg: %02.2X"

"\nReserved1: %02.2X"

"\nReserved2: %02.2X",

lpbi, lpbi->nSize, lpbi->bModel, lpbi->bSubModel,

lpbi->bBIOSRevision, lpbi->bHardwareCfg,

lpbi->reserved1, lpbi->reserved2);



//

printf("\n\nHardware configuration"

"\n----------------------");

//

bHdwCfg = lpbi->bHardwareCfg;

//

if(bHdwCfg & 0x80)

printf("\nDMA Channel 3");



if(bHdwCfg & 0x40)

printf("\nSecond IRQ Controller 8259");

if(bHdwCfg & 0x20)

printf("\nReal Time Clock");

if(bHdwCfg & 0x10)

printf("\nUsed function 4Fh INT 15h");

if(bHdwCfg & 0x8)

printf("\nBIOS event wait supported");

if(bHdwCfg & 0x4)

printf("\nExtended BIOS data used");

if(bHdwCfg & 0x2)

printf("\nMicro Channel Bus");

if(!(bHdwCfg & 0x2))

printf("\nISA Bus installed\n");



getch();

return 0;

}










Forekc.ru
, , , , , , , , , ,