Minor code cleanup and added an extra flag to the compiler. If a symbol is a label it will now hold a reference to the opcode and by extension the offset into the file it points to.

This commit is contained in:
2023-07-06 19:39:03 -05:00
parent 3031fa8b9b
commit 9c8fe17c8f
6 changed files with 37 additions and 31 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ int main(int argc, char* args[]) {
assemble();
printf("\nBytes:\n");
for(int i = 0; i < sizeof(mem); i++) {
for(unsigned long i = 0; i < sizeof(mem); i++) {
if (i != 0 && i % 8 == 0) printf("\n");
printf("%02X ", mem[i] & 0xFF);
}