By default the main 'damson' binary performs both compilation and emulation, alternative it can be executed to provide compilation and code generation. An additional 'compilation only' mode allows the compilation output (in intermediate format) to be examined. This is available by calling 'damson' with the -dis argument. This will direct the disassembled intermediate code to the console; damson -dis example.d damson -dis example.d > example.dis The disassembled output consists of the following for each node;Node: nodename The nodes global variables are output as follows; each global specifies the global name, vector offset and value; G1 0 0 G2 0 0 ... G 51 abc 51 1 The global vector is also output as hexadecimal values; e.g. gv: 0x000000 0x000000 ... 0x000001 If there are any externals variables these are output in the same format as global vectors with a prefix of 'M' rather than 'G'. e.g. M1 0 0 M2 0 0 ... M10 cba 10 1 Lastly the intermediate code is output as line number, (optional) label, instruction and any (optional) instruction arguments. e.g. 1: JUMP L4 2: L1: ENTRY f 3: LP1 n 4: LN 1 5: CMP <= 6: JF L2 7: LN 1 8: RES L3 ... 42: SYSCALL 4 exit 43: RETURN main |
Toolchain >