Category : Pascal Source Code
Archive   : SYSTEM20.ZIP
Filename : VERSION.PAS

 
Output of file : VERSION.PAS contained in archive : SYSTEM20.ZIP

procedure DVERS;
function DosVer : Real;
var

Regs : record
AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags : Integer;
{! 1. Instead use the Registers type from the Turbo 4.0 ^DOS unit.}
end;
AL,AH : Byte;

begin
Regs.AX := $3000;
MSDos( Dos.Registers(Regs) );
{! 2. Para^meter to MsDos must be of the type Registers defined in DOS unit.}
AL := Regs.AX and $FF;
AH := ( Regs.AX and $FF00 ) shr 8;
{! 3. Assign unsigned v^alues of $8000 or larger only to Word or LongInt types.}
DosVer := AL + AH/100;
end; { of func DosVer }

begin { main body of program DosVersion }
WRITEln(DosVer:4:2);
end; { of program DosVersion }


  3 Responses to “Category : Pascal Source Code
Archive   : SYSTEM20.ZIP
Filename : VERSION.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/