Add highlighting, fixed len instructions and more

This commit is contained in:
2025-02-09 21:15:50 +01:00
parent 45653b6372
commit e133c2df3a
17 changed files with 753 additions and 338 deletions

View File

@@ -77,15 +77,13 @@ int resolveALU(int baseOpcode, const char *src);
// The address is simply the offset into the output machine code buffer.
// For this example, every instruction is assumed to have a fixed length (opcode plus operand bytes).
//
int firstPass(const char *source);
void firstPass(const char *source);
//
// The second pass actually translates the assembly instructions to machine code.
// The machine code is written into the provided buffer. (It must be large enough.)
//
int secondPass(const char *source, uint8_t *code);
void completePass(const char *input, CPU *cpu, bool erase);
int completePass(const char *input, CPU *cpu, bool erase);
#endif //RISCB_ASSEMBLER_H