+ obtain the msdos version on startup

git-svn-id: trunk@24574 -
This commit is contained in:
nickysn 2013-05-24 15:42:43 +00:00
parent 52328554e4
commit 7628c87e44
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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.