BIOSINFO - 2


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;

}