|
@@ -24,6 +24,12 @@ interface
|
|
|
|
|
|
{$I systemh.inc}
|
|
{$I systemh.inc}
|
|
|
|
|
|
|
|
+{$ifdef cpum68k}
|
|
|
|
+{$define fpc_softfpu_interface}
|
|
|
|
+{$i softfpu.pp}
|
|
|
|
+{$undef fpc_softfpu_interface}
|
|
|
|
+{$endif cpum68k}
|
|
|
|
+
|
|
const
|
|
const
|
|
LineEnding = #10;
|
|
LineEnding = #10;
|
|
LFNSupport = True;
|
|
LFNSupport = True;
|
|
@@ -32,7 +38,7 @@ const
|
|
PathSeparator = ';';
|
|
PathSeparator = ';';
|
|
maxExitCode = 255;
|
|
maxExitCode = 255;
|
|
MaxPathLen = 256;
|
|
MaxPathLen = 256;
|
|
-
|
|
|
|
|
|
+
|
|
const
|
|
const
|
|
UnusedHandle : LongInt = -1;
|
|
UnusedHandle : LongInt = -1;
|
|
StdInputHandle : LongInt = 0;
|
|
StdInputHandle : LongInt = 0;
|
|
@@ -74,6 +80,25 @@ var
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
|
|
+{$ifdef cpum68k}
|
|
|
|
+{$define fpc_softfpu_implementation}
|
|
|
|
+{$i softfpu.pp}
|
|
|
|
+{$undef fpc_softfpu_implementation}
|
|
|
|
+
|
|
|
|
+{ we get these functions and types from the softfpu code }
|
|
|
|
+{$define FPC_SYSTEM_HAS_float64}
|
|
|
|
+{$define FPC_SYSTEM_HAS_float32}
|
|
|
|
+{$define FPC_SYSTEM_HAS_flag}
|
|
|
|
+{$define FPC_SYSTEM_HAS_extractFloat64Frac0}
|
|
|
|
+{$define FPC_SYSTEM_HAS_extractFloat64Frac1}
|
|
|
|
+{$define FPC_SYSTEM_HAS_extractFloat64Exp}
|
|
|
|
+{$define FPC_SYSTEM_HAS_extractFloat64Frac}
|
|
|
|
+{$define FPC_SYSTEM_HAS_extractFloat64Sign}
|
|
|
|
+{$define FPC_SYSTEM_HAS_ExtractFloat32Frac}
|
|
|
|
+{$define FPC_SYSTEM_HAS_extractFloat32Exp}
|
|
|
|
+{$define FPC_SYSTEM_HAS_extractFloat32Sign}
|
|
|
|
+{$endif cpum68k}
|
|
|
|
+
|
|
{$I system.inc}
|
|
{$I system.inc}
|
|
|
|
|
|
{$IFDEF MOSFPC_FILEDEBUG}
|
|
{$IFDEF MOSFPC_FILEDEBUG}
|
|
@@ -164,7 +189,7 @@ begin
|
|
argc:=0;
|
|
argc:=0;
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
-
|
|
|
|
|
|
+
|
|
{ Handle the other args }
|
|
{ Handle the other args }
|
|
count:=0;
|
|
count:=0;
|
|
{ first index is one }
|
|
{ first index is one }
|
|
@@ -182,7 +207,7 @@ begin
|
|
inc(localindex);
|
|
inc(localindex);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
- argc:=localindex;
|
|
|
|
|
|
+ argc:=localindex;
|
|
end;
|
|
end;
|
|
|
|
|
|
function GetProgDir: String;
|
|
function GetProgDir: String;
|
|
@@ -214,7 +239,7 @@ var
|
|
begin
|
|
begin
|
|
GetProgramName:='';
|
|
GetProgramName:='';
|
|
FillChar(s1,255,#0);
|
|
FillChar(s1,255,#0);
|
|
-
|
|
|
|
|
|
+
|
|
if GetProgramName(@s1[1],255) then begin
|
|
if GetProgramName(@s1[1],255) then begin
|
|
{ now check out and assign the length of the string }
|
|
{ now check out and assign the length of the string }
|
|
counter := 1;
|
|
counter := 1;
|
|
@@ -292,7 +317,7 @@ begin
|
|
iDOS := GetInterface(AOS_DOSBase,'main',1,nil);
|
|
iDOS := GetInterface(AOS_DOSBase,'main',1,nil);
|
|
iUtility := GetInterface(AOS_UtilityBase,'main',1,nil);
|
|
iUtility := GetInterface(AOS_UtilityBase,'main',1,nil);
|
|
{$ENDIF}
|
|
{$ENDIF}
|
|
-
|
|
|
|
|
|
+
|
|
{ Creating the memory pool for growing heap }
|
|
{ Creating the memory pool for growing heap }
|
|
AOS_heapPool:=CreatePool(MEMF_FAST,growheapsize2,growheapsize1);
|
|
AOS_heapPool:=CreatePool(MEMF_FAST,growheapsize2,growheapsize1);
|
|
if AOS_heapPool=nil then Halt(1);
|
|
if AOS_heapPool=nil then Halt(1);
|
|
@@ -318,7 +343,7 @@ begin
|
|
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
|
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
|
|
|
|
|
{ * AmigaOS doesn't have a separate stderr * }
|
|
{ * AmigaOS doesn't have a separate stderr * }
|
|
-
|
|
|
|
|
|
+
|
|
StdErrorHandle:=StdOutputHandle;
|
|
StdErrorHandle:=StdOutputHandle;
|
|
//OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
|
//OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
|
//OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
|
//OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|