-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Both cowasm and cowasm2 can't correctly deal with variable-sized instructions, where e.g. the magnitude of a displacement affects the instruction encoding. It needs a new assembler framework which does this properly.
In addition, I'm not happy with the design. The assembler stage makes things very slow --- on a real 8-bit system, almost all of the compilation time is I/O. I think it should be possible to streamline things a long way by splitting the assembler into the assembler parser and business logic, with a bytecode intermediate. The cowbe can generate the bytecode directly. That means it wouldn't need all the assembler text linked into it, shrinking things. The bytecode would also be denser than text meaning less I/O. We can then have a cowasm front end for turning human-readable text into this bytecode, in a way similar to what cowwrap currently does. cowlink would operate on pure bytecode.