Updated the way Instructions keep track of symbols. Only their name is important but we need the Symbols to be able to track which Instruction they point to (if they do that is, i.e. a label symbol).

This commit is contained in:
2022-10-06 21:11:22 -05:00
parent d53833c25f
commit bdb4d2b241
4 changed files with 47 additions and 34 deletions
+4 -2
View File
@@ -2,7 +2,9 @@
#define OPCODES_H
#include <string.h>
#include "symbols_table.h"
#include <errno.h>
#include <stdio.h>
//#include "symbols_table.h"
typedef enum {
R1, R2, R3, R4, R5, R6, R7, R8
@@ -27,7 +29,7 @@ typedef struct {
union {
int Number; //ConstanrParam
Registers Register; //Register param
Symbol* Symbol; //Address param
char* Symbol; //Symbol* Symbol; //Address param
} Value;
} Parameter;