From a8a1fd52a9fd651a6c8726f92a953e22e870ca5a Mon Sep 17 00:00:00 2001 From: EDiasAlberto Date: Tue, 4 Jun 2024 04:31:46 +0100 Subject: [PATCH] add to twopassassembly skeleton --- src/twopassassembly.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/twopassassembly.c b/src/twopassassembly.c index f7b75f8..d6194a8 100644 --- a/src/twopassassembly.c +++ b/src/twopassassembly.c @@ -38,3 +38,16 @@ word assembleBranch(a64inst_instruction *instr, int ){ break; } } + +void firstPass(a64inst_instruction instrs[], int numInstrs){ + //TODO: + // -iterate over instructions, adding to symbol table + // create symbol table and map labels to addresses/lines +} + +void secondPass(a64inst_instruction instrs[], int numInstrs){ + //TODO: + // iterate over instructions again, this time replacing labels + // with values from symbol table + // after a line has had all the values replaced, assemble it and append +} \ No newline at end of file