delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/26/22:22:22

From: stever <sredpath AT dy4 DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Problem, BIOS call(WinNT)
Date: Wed, 23 Jul 1997 12:25:17 +0100
Organization: dy4
Lines: 71
Message-ID: <33D5EA1D.E986828D@dy4.com>
Reply-To: sredpath AT dy4 DOT com
NNTP-Posting-Host: ukpc1.dy4.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

--------------3EBCB1B388608F5B9D761500
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The following program detects PCIBIOS when executed in a DOS window
running under Win95 on one machine but fails to detect the BIOS when
running on another machine running WinNT. The program was compiled on
the NT machine. The NT machine does have PCIBIOS.

#include dpmi.h

{

            __dpmi_regs r;

      r.h.ah = 0xb1;
      r.h.al = 0x01;

     __dpmi_int (0x1a, &r);

     if (!r.h.ah)
         printf("%c%c%c%cBIOS Present\n", r.h.dl, r.h.dh, r.h.edx_b2,
     r.h.edx_b3);
      else
         printf("PCI BIOS not found\n");

}

If PCI BIOS is present the edx register should contain the ascii
characters 'P' 'C' 'I' 'space' and the AH register=0;

Can anyone tell me why this wont work under windows NT?


--------------3EBCB1B388608F5B9D761500
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
The following program detects PCIBIOS when executed in a DOS window running
under Win95 on one machine but fails to detect the BIOS when running on
another machine running WinNT. The program was compiled on the NT machine.
The NT machine <B>does</B> have PCIBIOS.

<P>#include dpmi.h

<P>{<FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
__</FONT>dpmi_regs r;
<UL>&nbsp;r.h.ah = 0xb1;
<BR>&nbsp;r.h.al = 0x01;

<P>__dpmi_int (0x1a, &amp;r);

<P>if (!r.h.ah)
<BR>&nbsp;&nbsp;&nbsp; printf("%c%c%c%cBIOS Present\n", r.h.dl, r.h.dh,
r.h.edx_b2, r.h.edx_b3);
<BR>&nbsp;else
<BR>&nbsp;&nbsp;&nbsp; printf("PCI BIOS not found\n");</UL>
}

<P>If PCI BIOS is present the edx register should contain the ascii characters
'P' 'C' 'I' 'space' and the AH register=0;

<P>Can anyone tell me why this wont work under windows NT?
<BR>&nbsp;</HTML>

--------------3EBCB1B388608F5B9D761500--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019