Thread View: comp.os.ms-windows.programmer.tools
2 messages
2 total messages
Started by Keith C. Simon
Thu, 10 Aug 1995 07:00
Reading BIOS date from Windows
Author: Keith C. Simon
Date: Thu, 10 Aug 1995 07:00
Date: Thu, 10 Aug 1995 07:00
11 lines
759 bytes
759 bytes
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
Re: Reading BIOS date from Windows
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads