1
0
kolibrios/programs/develop/fp/rtl/sysinitpas.pp
bw f23fc38433 FreePascal RTL
git-svn-id: svn://kolibrios.org@616 a494cfbc-eb01-0410-851d-a64ba20cac60
2007-08-29 09:16:31 +00:00

53 lines
1008 B
ObjectPascal

{}
unit sysinitpas;
interface
implementation
var
SysInstance: Longint; external name '_FPC_SysInstance';
procedure PascalMain; stdcall; external name 'PASCALMAIN';
procedure SystemExit; external name 'SystemExit';
procedure EntryConsole; [public, alias:'_mainCRTStartup'];
var
ESP_: Pointer;
begin
asm movl %esp, ESP_; end;
StackTop := ESP_ + 8;
IsConsole := True;
PascalMain;
SystemExit;
end;
procedure EntryWindow; [public, alias:'_WinMainCRTStartup'];
var
ESP_: Pointer;
begin
asm movl %esp, ESP_; end;
StackTop := ESP_ + 8;
IsConsole := False;
PascalMain;
SystemExit;
end;
procedure _FPC_DLLMainCRTStartup(_hinstance, _dllreason, _dllparam: Longint); stdcall; public name '_DLLMainCRTStartup';
begin
{TODO}
IsConsole := True;
SysInstance := _hinstance;
end;
procedure _FPC_DLLWinMainCRTStartup(_hinstance, _dllreason, _dllparam: Longint); stdcall; public name '_DLLWinMainCRTStartup';
begin
{TODO}
IsConsole := False;
SysInstance := _hinstance;
end;
end.