PC-01 Lviv

It is currently 29 Mar 2024, 04:52

Forum Games WEB Tape Loader Twitter RSS

All times are UTC+03:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 30 Dec 2020, 13:39 
Offline

Joined: 18 May 2016, 19:55
Posts: 425
Вот подумал, а может все таки существует такое.

А существует ли (желательно паскелеподобный) компилятор в компиляторе ?
Для понятности о чём речь выкладываю вот такой код.
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 не предлагать!
Просто думаю может всё таки существует готовый да еще и паскелеподобный! :-)
Да вообще, все равно какой лишь бы можна было разобраться.
Заранее благодарен.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

Forum Games WEB Tape Loader Twitter RSS

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited