FasmOnDelphi Update + Fasm Implementation Update
This commit is contained in:
@@ -21,13 +21,16 @@ procedure TRuntimeBuilderTestObject.Test1();
|
||||
var
|
||||
Fasm:TRTBFasmCompiler;
|
||||
Src:TRTBSource;
|
||||
Module:TRTBModule;
|
||||
Func1:TRTBFunc;
|
||||
begin
|
||||
Fasm:=TRTBFasmCompiler.Create('..\..\..\lib\FasmOnDelphi\fasmw172\fasm');
|
||||
Src:=Fasm.GenNewSrc;
|
||||
Src.Text:='use32'+sLineBreak+'main:'+sLineBreak+'pop ecx'+sLineBreak+'pop eax'+sLineBreak+'jmp ecx';
|
||||
Src.Text:='use32'+sLineBreak+'main:'+sLineBreak+'pop ecx'+sLineBreak+'pop eax'+sLineBreak+'jmp ecx'+sLineBreak+'Pmain dd 0';
|
||||
Src.RegisterFunction('','main');
|
||||
Func1:=src.Compilate.Funtion['main'];
|
||||
Src.Register('','Pmain',TypeInfo(pointer));
|
||||
Module:=Src.Compilate;
|
||||
Func1:=Module.Funtion['main'];
|
||||
if 454<>Func1.Call(TypeInfo(integer),[454],CRTBCallTypeStdCall).AsInteger then
|
||||
begin
|
||||
raise Exception.Create('Error in test1');
|
||||
|
||||
Reference in New Issue
Block a user