Solved

Obtaining BIOS version

Posted on 1998-11-09
8
203 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
 

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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

759 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

18 Experts available now in Live!

Get 1:1 Help Now