[fpc-pascal]object code: how to generate?

K Stol k_stol at hotmail.com
Fri Apr 26 18:13:06 CEST 2002


I'm trying to make a really simple compiler, and i'm getting there, but i have one problem. The program makes a tree of the program, so i can traverse it and generate program code. But i would like to generate the (binary) object code, so it can actually create .EXE files, which can be run under DOS / windows. 
I think i can find the hex-codes of the instructions, but how can i make a REAL executable, so i don't have to make an interpreter. I've heard of the PSP, the first 256 bytes of a program, but i don't know how to write that to a file, neither (or what it is, for that matter).

Do you think you could give me some help with this? Thanks in advance.

k stol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20020426/93d72dcb/attachment.html>

More information about the fpc-pascal mailing list