Article View: comp.os.ms-windows.programmer.tools
Article #940Re: Reading BIOS date from Windows
From: Mike Barnes
Date: Thu, 10 Aug 1995 08:16
Date: Thu, 10 Aug 1995 08:16
38 lines
1782 bytes
1782 bytes
In article <40caqg$kqo@marlin.upe.ac.za> civeng1@ml.petech.ac.za writes: >I would like to read the date of the PC BIOS within Windows using >BC 4.0. The DOS version of a program I have written reads in the >bytes at addess 0xf000fff5 and works OK even when run under Windows. > >The same routine in a Windows program does not work. Any ideas on >how to create pointers to this same address. > >Any feedback please EMail me at address civeng1@ml.petech.ac.za > >Thanks >Keith C. Simon > I haven't time to check this all out thoroughly but I hope this helps. In a protected-mode program the "segment" porion of a long pointer is a selector not a segment number. A pointer to 0xf000:0xfff5 is referencing *selector* 0xf000 (which doesn't exist) when what you want is *segment* 0xf000. Fortunately Borland provides you with a ready-made selector. You need to do something like this:- unsigned long far *Ptr=MAKELP(&_F000H,0xfff5); Mike. -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ < Mike Barnes Tel: +44 1663 765734 > < Exodus Computer Systems Fax: +44 1663 765738 > < Stockport, England mike@exodus.co.uk > vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv My other .sig is a Ferrari^H^H^H^H^H^H^HBugatti EB110 Supersport
Technical Details
Message-ID:
<808042595snz@exodus.demon.co.uk>Path:
arc1-ca.pugleaf.net!exodus.demon.co.uk!mikeReferences:
<40caqg$kqo@marlin.upe.ac.za>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!exodus.demon.co.uk!mike From: Mike Barnes <mike@exodus.demon.co.uk> Newsgroups: comp.os.ms-windows.programmer.tools,comp.lang.c++ Subject: Re: Reading BIOS date from Windows Date: Thu, 10 Aug 95 08:16:35 GMT Organization: Exodus Computer Systems Message-ID: <808042595snz@exodus.demon.co.uk> References: <40caqg$kqo@marlin.upe.ac.za> Reply-To: Mike@exodus.demon.co.uk X-NNTP-Posting-Host: exodus.demon.co.uk X-Newsreader: Simple NEWS 2.0 (ka9q DIS 1.24)