Solved

Obtaining BIOS version

Posted on 1998-11-09
8
204 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
A Question about linking objects to ListView Items in Delphi 3 936
Converting a Windows Bitmap Stream to TIcon 2 800
.dat problems 39 200
Old Old code - Turbo Pascal issue 17 97
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

863 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

23 Experts available now in Live!

Get 1:1 Help Now