|
@@ -62,7 +62,8 @@ var
|
|
envp:PPchar; //!! public name 'operatingsystem_parameter_envp';
|
|
envp:PPchar; //!! public name 'operatingsystem_parameter_envp';
|
|
dos_argv0 : pchar; //!! public name 'dos_argv0';
|
|
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';
|
|
SaveInt00: FarPointer;public name '__SaveInt00';
|
|
|
|
|
|
@@ -179,7 +180,7 @@ begin
|
|
GetProgramName := '';
|
|
GetProgramName := '';
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
- dos_env_seg := PFarWord(Ptr(dos_psp, $2C))^;
|
|
|
|
|
|
+ dos_env_seg := PFarWord(Ptr(PrefixSeg, $2C))^;
|
|
ofs := 1;
|
|
ofs := 1;
|
|
repeat
|
|
repeat
|
|
Ch := PFarChar(Ptr(dos_env_seg,ofs - 1))^;
|
|
Ch := PFarChar(Ptr(dos_env_seg,ofs - 1))^;
|
|
@@ -215,10 +216,10 @@ function GetCommandLine: string;
|
|
var
|
|
var
|
|
len, I: Integer;
|
|
len, I: Integer;
|
|
begin
|
|
begin
|
|
- len := PFarByte(Ptr(dos_psp, $80))^;
|
|
|
|
|
|
+ len := PFarByte(Ptr(PrefixSeg, $80))^;
|
|
SetLength(GetCommandLine, len);
|
|
SetLength(GetCommandLine, len);
|
|
for I := 1 to len do
|
|
for I := 1 to len do
|
|
- GetCommandLine[I] := PFarChar(Ptr(dos_psp, $80 + I))^;
|
|
|
|
|
|
+ GetCommandLine[I] := PFarChar(Ptr(PrefixSeg, $80 + I))^;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -345,7 +346,7 @@ end;
|
|
|
|
|
|
function GetProcessID: SizeUInt;
|
|
function GetProcessID: SizeUInt;
|
|
begin
|
|
begin
|
|
- GetProcessID := dos_psp;
|
|
|
|
|
|
+ GetProcessID := PrefixSeg;
|
|
end;
|
|
end;
|
|
|
|
|
|
function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
|
|
function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
|