mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 13:29:14 +02:00
* fixed yet another dos_psp<>dgroup bug in the startup code for .exe files in
the tiny memory model git-svn-id: trunk@28033 -
This commit is contained in:
parent
3164a10d9d
commit
95449a3fd4
@ -154,6 +154,7 @@ cpu_detect_done:
|
|||||||
mov dx, dgroup
|
mov dx, dgroup
|
||||||
%endif
|
%endif
|
||||||
sub dx, cx ; dx = (ds - psp) in paragraphs
|
sub dx, cx ; dx = (ds - psp) in paragraphs
|
||||||
|
push dx ; save (ds - psp)
|
||||||
add dx, 1000h ; 64kb in paragraphs
|
add dx, 1000h ; 64kb in paragraphs
|
||||||
|
|
||||||
; get our MCB size in paragraphs
|
; get our MCB size in paragraphs
|
||||||
@ -175,10 +176,8 @@ cpu_detect_done:
|
|||||||
skip_mem_realloc:
|
skip_mem_realloc:
|
||||||
|
|
||||||
; bx = the new size in paragraphs
|
; bx = the new size in paragraphs
|
||||||
%ifndef __TINY__
|
pop cx ; cx = (ds - psp)
|
||||||
add bx, word [dos_psp]
|
sub bx, cx
|
||||||
sub bx, dgroup
|
|
||||||
%endif
|
|
||||||
mov cl, 4
|
mov cl, 4
|
||||||
shl bx, cl
|
shl bx, cl
|
||||||
sub bx, 2
|
sub bx, 2
|
||||||
@ -234,6 +233,8 @@ not_enough_mem:
|
|||||||
jmp error_msg
|
jmp error_msg
|
||||||
|
|
||||||
mem_realloc_err:
|
mem_realloc_err:
|
||||||
|
; at this point there's still (ds-psp) pushed on the stack, but we won't
|
||||||
|
; bother popping it, because we exit to DOS with an error message here
|
||||||
mov dx, mem_realloc_err_msg
|
mov dx, mem_realloc_err_msg
|
||||||
error_msg:
|
error_msg:
|
||||||
mov ah, 9
|
mov ah, 9
|
||||||
|
Loading…
Reference in New Issue
Block a user