Solved

Obtaining BIOS version

Posted on 1998-11-09
8
206 Views
Last Modified: 2010-04-16
I need the complete code to get the information about the BIOS name, manufacturer and version. Please help.
0
Comment
Question by:Bocian
8 Comments
 
LVL 2

Expert Comment

by:omsec
ID: 1216038
could that unit help ?

unit Bios;

interface

var
   BiosSeg : record
      ComBase : array[1..4] of word;
      LptBase : array[1..4] of word;
      InstalledHardware : array[1..2] of byte;
      POST_Status : byte;      { Convertible only }
      MemorySize : word;
      _RESERVED1 : word;
      KeyboardControl : array[1..2] of byte;
      AlternateKeypadEntry : byte;
      KeyboardBufferHeadPtr : word; { points to first char in type-ahead buffer }
      KeyboardBufferTailPtr : word; { points to last char in type-ahead buffer }
      KeyboardBuffer : array[1..16] of word;
      FloppyRecalStatus : byte;
      FloppyMotorStatus : byte;
      FloppyMotorOffCounter : byte;
      FloppyPrevOpStatus : byte;
      FloppyControllerStatus : array[1..7] of byte;
      DisplayMode : byte;
      NumberOfColumns : word;
      RegenBufferLength : word;
      RegenBufferAddress : word;
      CursorPosition : array[1..8] of word;
      CursorType : word;
      CurrentDisplayPage : byte;
      VideoControllerBaseAddress : word;
      Current3x8Register : byte;
      Current3x9Register : byte;
      PointerToResetCode : pointer;  { PS/2 only - except model 30 }
      _RESERVED2 : byte;
      TimerCounter : longint;
      TimerOverflowFlag : byte;  { non-zero means timer passed 24 hours }
      BreakKeyState : byte;
      ResetFlag : word;  { $1234=bypass mem test; $4321=preserve mem (PS/2) }
                         { $5678=system supended (Convertible) }
                         { $9ABC=manufacturing test (Convertible) }
                         { $ABCD=system POST loop (Convertible only) }
      FixedDiskPrevOpStatus : byte;
      NumberOfFixedDrives : byte;
      FixedDiskDriveControl : byte;   {XT only}
      FixedDiskControllerPort : byte; {XT only}
      LptTimeOut : array[1..4] of byte;  { [4] valid for PC, XT and AT only }
      ComTimeOut : array[1..4] of byte;
      KeyboardBufferStartOffsetPtr :word;
      KeyboardBufferEndOffsetPtr :word;
      VideoRows : byte;
      CharacterHeight : word;  { bytes per character }
      VideoControlStates : array[1..2] of byte;

      _RESERVED3 : word;
      MediaControl : byte;
      FixedDiskControllerStatus : byte; { AT, XT after 1/10/85, PS/2 only }
      FixedDiskControllerErrorStatus : byte; { AT, XT after 1/10/85, PS/2 only }
      FixedDiskInterruptControl : byte; { AT, XT after 1/10/85, PS/2 only }
      _RESERVED4 : byte;
      DriveMediaState : array[0..1] of byte;
      _RESERVED5 : word;
      DriveCurrentCylinder : array[0..1] of byte;
      KeyboardModeState : byte;
      KeyboardLEDflags : byte;
      UserWaitCompleteFlagAddress : pointer;
      UserWaitCount : longint;   { micro-seconds }
      WaitActiveFlag : byte;
      _RESERVED6 : array[1..7] of byte;
      VideoParameterTable : pointer;          { EGA and PS/2 only }
      DynamicSaveArea : pointer;              { EGA and PS/2 only }
      AlphaModeAuxCharGenerator : pointer;    { EGA and PS/2 only }
      GraphicsModeAuxCharGenerator : pointer; { EGA and PS/2 only }
      SecondarySaveArea : pointer;            { PS/2 only (not Model 30) }
      _RESERVED7 : array[1..4] of byte;
      _RESERVED8 : array[1..64] of byte;
      PrintScreenStatus : byte;
   end absolute $0040:$0000;

implementation

end.

0
 

Author Comment

by:Bocian
ID: 1216039
I need the full version name, such as "American Megatrends Version 2.556.15, DATE bla bla" and so on, that means the text that is displayed when computer boots up.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1216040
In NT it's in the registry.
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System
value: SystemBiosVersion
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Bocian
ID: 1216041
I cannot rely on the info in registry. I have to get it right rom the BIOS. Any other suggestions?


0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1216042
NT will never allow you to access the bios directly. So only if you are interested in writing device drivers you can do what you want.
Let me guess, you want to copy protect your application?
0
 
LVL 4

Expert Comment

by:jack_p50
ID: 1216043
Do you need a pascal program or executable?
0
 
LVL 5

Accepted Solution

by:
scrapdog earned 100 total points
ID: 1216044
var date :array[0..7] of char absolute $f000:$fff6;

begin
  for i := 0 to 7 do write(date[i]);
  readln;
end.


This will obtain the date of the bios version.  The manufacturer/version is not stored in a standard memory location;  it is dependent on the version of bios.  However the date is always stored starting at $f000:$fff6.

You can also read the byte located in $f000:fffe to determine the PC type that the bios was written for.

A value of $FC means it is for an AT, $FF means it is for a PC, and $FE and $FB (or anything else) means that is for an XT.
0
 
LVL 1

Expert Comment

by:FuzzyLogic
ID: 1216045
I don't know if this will work, but you may try:


program ReadBIOSData;

type
  BIOSTable = record
    SIZE:word;
    Model:byte;
    SubModel:byte;
    Revision:byte;
    Features:array [1..5] of byte;
    Data:array [$0A..$FF] of char;
  end;

var
  DataStruct:^BIOSTable;
  OK:boolean;
  i:integer;

begin

  asm
    mov  byte ptr OK, FALSE
    mov  ax,0C0h
    int  15h
    jc   @NotSupported
    cmp  ah,86h
    je   @NotSupported
    mov  word ptr [DataStruct],BX
    mov  word ptr [DataStruct+2],ES
    mov  byte ptr OK, TRUE
@NotSupported:
  end;

  if OK then begin
    for i:=$0A to DataStruct^.SIZE-1 do
      write(DataStruct^.Data[i]);
    writeln;
  end
  else begin
    writeln('Not Supported!');
  end;


end.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question