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