+ huge memory model fixes in the i8086-msdos startup code

git-svn-id: trunk@31501 -
This commit is contained in:
nickysn 2015-09-03 22:08:53 +00:00
parent 0fdc62e0f7
commit 63f86ee6a5

View File

@ -76,6 +76,7 @@
resb 0100h resb 0100h
%endif %endif
..start: ..start:
%ifndef __HUGE__
%ifdef __TINY__ %ifdef __TINY__
mov bx, cs mov bx, cs
%else %else
@ -95,12 +96,18 @@
xor al, al xor al, al
cld cld
rep stosb rep stosb
%endif ; not __HUGE__
; save the Program Segment Prefix ; save the Program Segment Prefix
push ds push ds
; init DS ; init DS
%ifdef __HUGE__
mov bx, SYSTEM_DATA
mov ds, bx mov ds, bx
%else
mov ds, bx
%endif
; pop the PSP from stack and store it in the pascal variable PrefixSeg ; pop the PSP from stack and store it in the pascal variable PrefixSeg
pop ax pop ax
@ -279,6 +286,8 @@ FPC_INT00_HANDLER:
; init ds ; init ds
%ifdef __TINY__ %ifdef __TINY__
mov bp, cs mov bp, cs
%elifdef __HUGE__
mov bp, SYSTEM_DATA
%else %else
mov bp, DGROUP mov bp, DGROUP
%endif %endif
@ -341,6 +350,11 @@ FPC_INT00_HANDLER:
FPC_INSTALL_INTERRUPT_HANDLERS: FPC_INSTALL_INTERRUPT_HANDLERS:
push ds push ds
%ifdef __HUGE__
mov ax, SYSTEM_DATA
mov ds, ax
%endif
; save old int 00 handler ; save old int 00 handler
mov ax, 3500h mov ax, 3500h
int 21h int 21h
@ -369,6 +383,11 @@ FPC_INSTALL_INTERRUPT_HANDLERS:
FPC_RESTORE_INTERRUPT_HANDLERS: FPC_RESTORE_INTERRUPT_HANDLERS:
push ds push ds
%ifdef __HUGE__
mov ax, SYSTEM_DATA
mov ds, ax
%endif
mov ax, 2500h mov ax, 2500h
lds dx, [__SaveInt00] lds dx, [__SaveInt00]
int 21h int 21h
@ -489,6 +508,11 @@ FPC_CHECK_NULLAREA:
%endif %endif
%endif %endif
%ifdef __HUGE__
; reference the system unit's data segment
segment SYSTEM_DATA use16 class=FAR_DATA align=2
%endif
segment data class=DATA align=2 segment data class=DATA align=2
%ifdef __NEAR_DATA__ %ifdef __NEAR_DATA__
mem_realloc_err_msg: mem_realloc_err_msg: