🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3203

Getting BIOS Date

#3203
From: BeyondEngineering
Date: Fri, 28 Jul 2006 14:13
82 lines
3204 bytes
Hi guys,

At this time I've got this information on how to get the bios date of a

PC:


The BIOS date is stored in memory starting at F000h:FFF5h just waiting
for us to find it. Below I've included several methods that one might
use, plus a little explanation of what we're getting. Once you know the

date your BIOS was made you should be able to reference that date
against tables from your BIOS vendor showing versions and their Y2K
readiness.


The easiest way to view memory at this location is using the DEBUG
utility. If you enter the command d f000:fff0 debug will dump the next
16 bytes of memory, including the 8 bytes containing the date field
we're looking for. If you want to be precise you could enter d
f000:fff5 l 8 to see the specific 8 bytes we're looking for. When your
done quit will end your debug session.


C:\>debug
-d f000:fff0
F000:FFF0  EA 5B E0 00 F0 30 31 2F-30 34 2F 39 36 00 FC 0A
.[...01/04/96...
-d f000:fff5 l 8
F000:FFF0                 30 31 2F-30 34 2F 39 36
01/04/96
-quit
C:\>


Note that when we print out the whole 16 bytes at f000:fff0 we get junk

before and after the BIOS date. The first 5 bytes are a jump
instruction to the POST routine, and the last 3 could be used to
determine the PC BIOS type (AT or XT.)


We can also whip up a little code to find our BIOS date, the following
C code should do it, and should compile under your favorite compiler.


#include <dos.h>
#include <stdio.h>


int main()
 {
  int foo, i;


  printf("\n");
  for(i=0;i<8;i++)
   {
    foo = peekb(0xf000, 0xFFF5+i);
    printf("%c", foo);
   }
  printf("\n");


  return 0;
 }


I found the address locations referenced here in an incredibly useful
book called PC Intern - System Programming by Michael Tischer (ISBN
155755-304-1)


However, I want to get the same results using C++ Builder 6.0 but I can

not find the peekb function so, does anyone know how can I get this
info using C++ Builder??? What any other information can I get from the

Bios using C++ Builder?? 


Any help is really appreciated.
Technical Details
Message-ID: <1154096036.127782.174580@75g2000cwc.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!75g2000cwc.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6a721bdbafc1fb5f,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!75g2000cwc.googlegroups.com!not-for-mail
From: "BeyondEngineering" <elkin.enigma@gmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Getting BIOS Date
Date: 28 Jul 2006 07:13:56 -0700
Organization: http://groups.google.com
Lines: 83
Message-ID: <1154096036.127782.174580@75g2000cwc.googlegroups.com>
NNTP-Posting-Host: 200.25.224.130
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1154096041 14750 127.0.0.1 (28 Jul 2006 14:14:01 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 28 Jul 2006 14:14:01 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: 75g2000cwc.googlegroups.com; posting-host=200.25.224.130;
   posting-account=RFTtWA0AAAAsCaTrF5RYZZvKxsv-8ICX