|
@@ -203,13 +203,15 @@ skip_mem_realloc:
|
|
|
and bl, 0FEh
|
|
|
mov word [__stkbottom], bx
|
|
|
|
|
|
- cmp bx, _end wrt dgroup
|
|
|
+ mov ax, _end wrt dgroup
|
|
|
+ cmp bx, ax
|
|
|
jb not_enough_mem
|
|
|
|
|
|
; heap is between [ds:_end wrt dgroup] and [ds:__stkbottom - 1]
|
|
|
- mov word [__nearheap_start], _end wrt dgroup
|
|
|
- mov bx, word [__stkbottom]
|
|
|
- dec bx
|
|
|
+ add ax, 3
|
|
|
+ and al, 0FCh
|
|
|
+ mov word [__nearheap_start], ax
|
|
|
+ and bl, 0FCh
|
|
|
mov word [__nearheap_end], bx
|
|
|
|
|
|
; ****************************************************************************
|