mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:09:25 +02:00
* msdos system unit variable dos_psp renamed PrefixSeg for TP7 compatibility
git-svn-id: trunk@28047 -
This commit is contained in:
parent
a27ea85560
commit
23b0cf2340
@ -960,7 +960,7 @@ var
|
||||
ofs: Word;
|
||||
Ch, Ch2: Char;
|
||||
begin
|
||||
dos_env_seg := PFarWord(Ptr(dos_psp, $2C))^;
|
||||
dos_env_seg := PFarWord(Ptr(PrefixSeg, $2C))^;
|
||||
GetEnvStr := 1;
|
||||
OutEnvStr := '';
|
||||
ofs := 0;
|
||||
@ -1061,7 +1061,7 @@ end;
|
||||
|
||||
Procedure Keep(exitcode: word); assembler;
|
||||
asm
|
||||
mov bx, dos_psp
|
||||
mov bx, PrefixSeg
|
||||
dec bx
|
||||
mov es, bx
|
||||
mov dx, es:[3]
|
||||
|
@ -39,7 +39,7 @@
|
||||
segment text use16 class=code
|
||||
|
||||
extern PASCALMAIN
|
||||
extern dos_psp
|
||||
extern __fpc_PrefixSeg
|
||||
extern dos_version
|
||||
extern __Test8086
|
||||
|
||||
@ -102,9 +102,9 @@
|
||||
; init DS
|
||||
mov ds, bx
|
||||
|
||||
; pop the PSP from stack and store it in the pascal variable dos_psp
|
||||
; pop the PSP from stack and store it in the pascal variable PrefixSeg
|
||||
pop ax
|
||||
mov word [dos_psp], ax
|
||||
mov word [__fpc_PrefixSeg], ax
|
||||
|
||||
; get DOS version and save it in the pascal variable dos_version
|
||||
mov ax, 3000h
|
||||
@ -161,7 +161,7 @@ cpu_detect_done:
|
||||
data_with_maxheap_less_than_64k:
|
||||
|
||||
; try to resize our main DOS memory block until the end of the data segment (or even smaller, if maxheap is small)
|
||||
mov cx, word [dos_psp]
|
||||
mov cx, word [__fpc_PrefixSeg]
|
||||
%ifdef __TINY__
|
||||
mov dx, cs
|
||||
%else
|
||||
|
@ -62,7 +62,8 @@ var
|
||||
envp:PPchar; //!! public name 'operatingsystem_parameter_envp';
|
||||
dos_argv0 : pchar; //!! public name 'dos_argv0';
|
||||
|
||||
dos_psp:Word;public name 'dos_psp';
|
||||
{ The DOS Program Segment Prefix segment (TP7 compatibility) }
|
||||
PrefixSeg:Word;public name '__fpc_PrefixSeg';
|
||||
|
||||
SaveInt00: FarPointer;public name '__SaveInt00';
|
||||
|
||||
@ -179,7 +180,7 @@ begin
|
||||
GetProgramName := '';
|
||||
exit;
|
||||
end;
|
||||
dos_env_seg := PFarWord(Ptr(dos_psp, $2C))^;
|
||||
dos_env_seg := PFarWord(Ptr(PrefixSeg, $2C))^;
|
||||
ofs := 1;
|
||||
repeat
|
||||
Ch := PFarChar(Ptr(dos_env_seg,ofs - 1))^;
|
||||
@ -215,10 +216,10 @@ function GetCommandLine: string;
|
||||
var
|
||||
len, I: Integer;
|
||||
begin
|
||||
len := PFarByte(Ptr(dos_psp, $80))^;
|
||||
len := PFarByte(Ptr(PrefixSeg, $80))^;
|
||||
SetLength(GetCommandLine, len);
|
||||
for I := 1 to len do
|
||||
GetCommandLine[I] := PFarChar(Ptr(dos_psp, $80 + I))^;
|
||||
GetCommandLine[I] := PFarChar(Ptr(PrefixSeg, $80 + I))^;
|
||||
end;
|
||||
|
||||
|
||||
@ -345,7 +346,7 @@ end;
|
||||
|
||||
function GetProcessID: SizeUInt;
|
||||
begin
|
||||
GetProcessID := dos_psp;
|
||||
GetProcessID := PrefixSeg;
|
||||
end;
|
||||
|
||||
function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
|
||||
|
Loading…
Reference in New Issue
Block a user