Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Which Programming language is this????????????

Status
Not open for further replies.

amitjagtap

Full Member level 5
Full Member level 5
Joined
Jan 10, 2007
Messages
304
Helped
42
Reputation
84
Reaction score
36
Trophy points
1,308
Activity points
3,273
HI all,
Can anybody tell me which programming language is this ...

init PCI; { Unit to communicate with chipsets }

interface

uses AMIBIOS, AsusBIOS;

Const
PCICfIdx = $CF8;
PCICfData = $CFC;

Var
NorthFunc, SouthFunc, LPCFunc: Word;
NorthPos,SouthPos,PMUPos,CurPCIROM,PCIROMBus,PCIROMDev,PCIROMFun,LPCBase: Byte;
CurrentChipset, CurrentPCICard: string;
WantToUseAMI, AMIUsed, ChipsetFound, ROMEnabled, PCIROMEnabled: Boolean;
WantToUseAsus, AsusUsed: Boolean;
PCIROMs: array[1..20] of
record
MaxSize : LongInt;
VenID, DevID : Word;
Bus, Pos : Byte;
end;
BIOSID: array[1..8] of Char; {v1.34}

Procedure OPortD( Prt : Word; Val : LongInt );
Function IPortD( Prt : Word ) : LongInt;
Function GetPCIRegD( Bus, Dev, Func, Reg : Byte ) : LongInt;
Procedure SetPCIRegD( Bus, Dev, Func, Reg : Byte; Value : LongInt );
Function LocatePIIX : {byte}Boolean; {v1.22 byte->boolean}
procedure GetBIOSID;
Procedure RomEnable( Map : boolean);
procedure ShadowDisable_Aladdin; {v1.31}
procedure ShadowRestore_Aladdin; {v1.31}

implementation

Uses Tools,Flash,Crt,DMI;

{ PortD[ x ] := y }
Procedure OPortD( Prt : Word; Val : LongInt ); Assembler;
Asm
DB 66H
MOV AX,WORD PTR Val
MOV DX,Prt
DB 66H
OUT DX,AX
End;

{ y := PortD[ x ] }
Function IPortD( Prt : Word ) : LongInt; Assembler;
Asm
MOV DX,Prt
DB 66H
IN AX,DX
DB 66H
MOV DX,AX
DB 66H
SHR DX,16
End;

{Read PCI configuration reg}
Function GetPCIRegD( Bus, Dev, Func, Reg : Byte ) : LongInt;
Begin
OPortD( PCICfIdx, $80000000 or
( LongInt( Bus ) shl 16 ) or
( ( LongInt( Dev ) and $1F ) shl 11 ) or
( ( LongInt( Func ) and $7 ) shl 8 ) or
( Reg and $FC ) );
GetPCIRegD := IPortD( PCICfData );
End;
 

Pascal with some inline assembly
 

With an apparent typo. I guess

Code:
  init PCI;

should be

Code:
  unit PCI;
 

Looks like Borland Pascal. The most recent version 7.0 was released in 1992.
 

    amitjagtap

    Points: 2
    Helpful Answer Positive Rating
Does Pascal is used for BIOS writing....Which Compiler?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top