[fpc-pascal]object code: how to generate?
Andreas K. Foerster
Andreas at AKFoerster.de
Sun Apr 28 12:52:58 CEST 2002
On Fri, Apr 26, 2002 at 06:13:06PM +0200, K Stol wrote:
> 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 don't know how far you are in programming, but creating a real
compiler is a difficult thing.
But there are alternatives between a compiler and an interpreter.
Perhaps one of these is a solution for you:
1) You could make a converter to a programming language for wich
you do have a complier. Examples for this are p2c, f2c, ...
2) Another interresting solution I found in the program BEC. It creates
a pseudo-code and then it attaches the pseudo-code to the interpreter,
so you just have one single executable. When you start the executable,
you start the interpreter and this reads the pseudo-code from itself,
ie. from the same file. But the enduser doesn't have to know about
btw. "pseudo-code" is simply the source code with the commands
replaced by single bytes. Comments may be stripped away.
More information about the fpc-pascal