Вот подумал, а может все таки существует такое.
А существует ли (желательно паскелеподобный) компилятор в компиляторе ?
Для понятности о чём речь выкладываю вот такой код.
Code:
program Pr;
var Code:array[0..1000] of Byte;
Var source:string;
begin
source:='program Privet; {$APPTYPE CONSOLE} begin Writeln('+chr(39)+'Привет мир!'+chr(39)+');end.';
Compile(source,Code);
asm
mov eax, offset Code;
jmp eax;{или же call eax;}
end;
end.
Пояснение. В таком компиляторе есть некая процедура Compile(source:string;var m:array of Byte);
которая строку-с-исх.кодом-source-типа-string (или же в виде массива-с-исх.кодом, не важно), скомпилирует в машинный код, в масив CODE которой можна запустить на исполнение.
Самому написать свой мини-FASM не предлагать!
Просто думаю может всё таки существует готовый да еще и паскелеподобный!
Да вообще, все равно какой лишь бы можна было разобраться.
Заранее благодарен.