mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 18:49:49 +02:00
+ obtain the msdos version on startup
git-svn-id: trunk@24574 -
This commit is contained in:
parent
52328554e4
commit
7628c87e44
@ -6,6 +6,7 @@
|
||||
|
||||
extern PASCALMAIN
|
||||
extern dos_psp
|
||||
extern dos_version
|
||||
|
||||
extern _edata ; defined by WLINK, indicates start of BSS
|
||||
extern _end ; defined by WLINK, indicates end of BSS
|
||||
@ -42,6 +43,12 @@ no_bss:
|
||||
pop ax
|
||||
mov word [dos_psp], ax
|
||||
|
||||
; get DOS version and save it in the pascal variable dos_version
|
||||
mov ax, 3000h
|
||||
int 21h
|
||||
xchg al, ah
|
||||
mov word [dos_version], ax
|
||||
|
||||
; allocate max heap
|
||||
; TODO: also support user specified heap size
|
||||
; try to resize our main DOS memory block until the end of the data segment
|
||||
|
@ -81,6 +81,9 @@ implementation
|
||||
const
|
||||
fCarry = 1;
|
||||
|
||||
var
|
||||
dos_version:Word;public name 'dos_version';
|
||||
|
||||
{$I registers.inc}
|
||||
|
||||
procedure Intr(IntNo: Byte; var Regs: Registers); external name 'FPC_INTR';
|
||||
@ -287,4 +290,5 @@ begin
|
||||
{ Reset IO Error }
|
||||
InOutRes:=0;
|
||||
initvariantmanager;
|
||||
Writeln(dos_version);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user