add to twopassassembly skeleton

This commit is contained in:
EDiasAlberto 2024-06-04 04:31:46 +01:00
parent ce0f825e1d
commit a8a1fd52a9

View File

@ -38,3 +38,16 @@ word assembleBranch(a64inst_instruction *instr, int ){
break; 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
}