mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:09:23 +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
|
||||
%endif
|
||||
sub dx, cx ; dx = (ds - psp) in paragraphs
|
||||
push dx ; save (ds - psp)
|
||||
add dx, 1000h ; 64kb in paragraphs
|
||||
|
||||
; get our MCB size in paragraphs
|
||||
@ -175,10 +176,8 @@ cpu_detect_done:
|
||||
skip_mem_realloc:
|
||||
|
||||
; bx = the new size in paragraphs
|
||||
%ifndef __TINY__
|
||||
add bx, word [dos_psp]
|
||||
sub bx, dgroup
|
||||
%endif
|
||||
pop cx ; cx = (ds - psp)
|
||||
sub bx, cx
|
||||
mov cl, 4
|
||||
shl bx, cl
|
||||
sub bx, 2
|
||||
@ -234,6 +233,8 @@ not_enough_mem:
|
||||
jmp error_msg
|
||||
|
||||
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
|
||||
error_msg:
|
||||
mov ah, 9
|
||||
|
Loading…
Reference in New Issue
Block a user