|
@@ -152,30 +152,38 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
{*****************************************************************************
|
|
{*****************************************************************************
|
|
- Exit code and Entry Point
|
|
|
|
|
|
+ System Dependent Exit code
|
|
*****************************************************************************}
|
|
*****************************************************************************}
|
|
|
|
|
|
-procedure PascalMain; stdcall; external name 'PASCALMAIN';
|
|
|
|
-procedure fpc_do_exit; stdcall; external name 'FPC_DO_EXIT';
|
|
|
|
|
|
+//procedure PascalMain; stdcall; external name 'PASCALMAIN';
|
|
|
|
+//procedure fpc_do_exit; stdcall; external name 'FPC_DO_EXIT';
|
|
|
|
|
|
-procedure SysInitStdIO;
|
|
|
|
|
|
+Procedure system_exit;
|
|
begin
|
|
begin
|
|
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure _E32Startup; stdcall; public name '_E32Startup';
|
|
|
|
|
|
+var
|
|
|
|
+ { value of the stack segment
|
|
|
|
+ to check if the call stack can be written on exceptions }
|
|
|
|
+ _SS : Cardinal;
|
|
|
|
+
|
|
|
|
+function Pascal_E32Main: Integer; cdecl; [public, alias: '_Pascal_E32Main'];
|
|
|
|
+var
|
|
|
|
+ ST : pointer;
|
|
begin
|
|
begin
|
|
- IsLibrary:=false;
|
|
|
|
-
|
|
|
|
- PascalMain;
|
|
|
|
|
|
+ IsLibrary := false;
|
|
|
|
+
|
|
|
|
+// PascalMain;
|
|
|
|
|
|
{ if we pass here there was no error }
|
|
{ if we pass here there was no error }
|
|
- fpc_do_exit;
|
|
|
|
|
|
+ system_exit;
|
|
end;
|
|
end;
|
|
|
|
|
|
-{*****************************************************************************
|
|
|
|
- Process routines
|
|
|
|
-*****************************************************************************}
|
|
|
|
|
|
+procedure SysInitStdIO;
|
|
|
|
+begin
|
|
|
|
+
|
|
|
|
+end;
|
|
|
|
|
|
(* ProcessID cached to avoid repeated calls to GetCurrentProcess. *)
|
|
(* ProcessID cached to avoid repeated calls to GetCurrentProcess. *)
|
|
|
|
|
|
@@ -192,5 +200,11 @@ begin
|
|
result := stklen;
|
|
result := stklen;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{
|
|
|
|
+const
|
|
|
|
+ Exe_entry_code : pointer = @Exe_entry;
|
|
|
|
+ Dll_entry_code : pointer = @Dll_entry;
|
|
|
|
+}
|
|
|
|
+
|
|
begin
|
|
begin
|
|
end.
|
|
end.
|