Minimal Delphi RTL added

This commit is contained in:
Владислав Джавадов 2020-05-22 01:01:43 +03:00
parent 743e32c30b
commit b0ec37bebd
2 changed files with 76 additions and 0 deletions

35
RTL/SysInit.pas Normal file
View File

@ -0,0 +1,35 @@
(*
Minimal Delphi SysInit unit
*)
unit SysInit;
interface
procedure _InitExe;
procedure _Halt0;
procedure _InitLib(Context: PInitContext);
var
ModuleIsLib: Boolean;
TLSIndex: Integer = -1;
TLSLast: Byte;
const
PtrToNil: Pointer = nil;
implementation
procedure _InitLib(context: pinitcontext);
asm
end;
procedure _InitExe;
asm
end;
procedure _Halt0;
asm
end;
end.

41
RTL/System.pas Normal file
View File

@ -0,0 +1,41 @@
(*
Minimal Delphi System unit
*)
unit System;
interface
type
PPAnsiChar = ^PAnsiChar;
PInteger = ^Integer;
TGUID = record
D1: LongWord;
D2: Word;
D3: Word;
D4: array [0..7] of Byte;
end;
PInitContext = ^TInitContext;
TInitContext = record
OuterContext: PInitContext;
ExceptionFrame, InitTable, InitCount: Integer;
Module: Pointer;
DLLSaveEBP, DLLSaveEBX, DLLSaveESI, DLLSaveEDI: Pointer;
ExitProcessTLS: procedure;
DLLInitState: byte;
end;
procedure _HandleFinally;
implementation
uses
SysInit;
procedure _HandleFinally;
asm
end;
end.