Browse Source

+ enabled the huge (>64kb) heap support in the compact and large memory models

git-svn-id: trunk@28349 -
nickysn 11 years ago
parent
commit
a61c775d29
1 changed files with 10 additions and 2 deletions
  1. 10 2
      rtl/msdos/prt0comn.asm

+ 10 - 2
rtl/msdos/prt0comn.asm

@@ -231,9 +231,17 @@ skip_mem_realloc:
         shr dx, cl
         add ax, dx
         mov word [__nearheap_start], 0
-        mov word [__nearheap_end], 0FFF0h
         mov word [__nearheap_start + 2], ax
-        mov word [__nearheap_end   + 2], ax
+
+       ; get our MCB size in paragraphs
+        mov cx, word [__fpc_PrefixSeg]
+        dec cx
+        mov es, cx
+        mov bx, word [es:3]
+        add bx, cx
+        ; __nearheap_end := end_of_dos_memory_block - 16 bytes
+        mov word [__nearheap_end], 0
+        mov word [__nearheap_end + 2], bx
 %endif
 
 %ifdef __FAR_CODE__