BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting the Bios Date

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
BeyondEngineering
Guest





PostPosted: Wed Jul 26, 2006 5:54 am    Post subject: Getting the Bios Date Reply with quote



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,
or you can use this executable: biosdate
ZIP: 5,509 bytes - Created with PKZIP 2.04g
EXE: 8,771 bytes - Created with Borland Turbo C++ 3.0

#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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.