Thu Feb 15 12:28:56 GMT 2007
new badnop control flow
in = project sourcecode
out = compiled target code + dictionary
1. PARSE EXTENSIONS
Read all source files and extend the compiler to include the macros
and constants defined in the source files. This effectively builds
a new special purpose compiler for the code in the project.
2. COMPILE CODE
Convert all code definitions and data allocations to a form that is
executable by the CAT VM, and run this code. This generates
optimized symbolic assembly.
3. ASSEMBLE CODE
In a two-pass algorithm, convert the symbolic assembly to binary
opcodes, allocating and resolving memory addresses. This process
uses the current dictionary, reflecting the state of the target,
and produces a new dictionary and a list of binary code.