From 28d6a88c02f10b75fb4c5cb46178d2ef71629494 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 1 Aug 2019 23:12:34 +1200 Subject: Refactor disassembler to move data through instruction list This refactors the disassembler into two stages with the list of struct instruction (currently also output by the parse stage) as an "intermediate language" between disassembly and assembler output. This should make these units, especially the "machine code => IL" section, more reusable for future soft emulation work. --- output_asm.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 output_asm.h (limited to 'output_asm.h') diff --git a/output_asm.h b/output_asm.h new file mode 100644 index 0000000..b4afd2a --- /dev/null +++ b/output_asm.h @@ -0,0 +1,6 @@ +#ifndef OUTPUT_ASM_H +#define OUTPUT_ASM_H + +int output_asm(FILE *fout, struct label *labels, size_t label_count, struct instruction *insts, size_t insts_count); + +#endif /* OUTPUT_ASM_H */ -- cgit v1.1