Solved

Obtaining BIOS version

Posted on 1998-11-09
8
205 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pascal code for reading registry 1 351
Delphi Thead Pool or (only run last procedure called) 13 806
File restrict, lock. 4 212
Lazarus and Excel formulas via OLE 7 271
Employees depend heavily on their PCs, and new threats like ransomware make it even more critical to protect their important data.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

816 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now