Quote:
My side project is an 8-bit system (emulator) looking similair to the 65xx. I looking for a simple, easy way to start generating code. I probably like the assembler to be coded in C but let this thread be open to any recommendation.
The older dos shareware or the C -users group may have a table driven cross assembler.
The problem is C is no longer really able to compile the old 16 bit stuff.
C is so messed up now that it hard even to know just what will compile in the 64bit world.
If you do write your own assembler keep the source code as simple as posible
in language constructs so can port the code for self compiling.
Code:
top:
ptr = ptr + 1
ch=*ptr
if (ch = NULL) goto out
if (ch == WHAT ) { do that thing(); goto top:}
out:
rather than
while(ch=++*ptr && ch== WHAT) do that thing()
Assume 32Kb for the assembler
if self hosting and 16Kb for a simple dos.
48Kb for a compiler.