moving to nested linked list structure for instructions and arguments. this should allow for better dynamism between instructions and clearer organizational logic.

This commit is contained in:
Josh Ashton
2023-10-12 17:11:55 -06:00
parent 1c2ce3e971
commit 233c1ba1d9
11 changed files with 472 additions and 200 deletions
+11
View File
@@ -0,0 +1,11 @@
typedef struct args {
int arg;
struct args *nextArg; // Allows dynamically sized lists of arguments. For eg. syscall will just be 1 element, but add has 4 elements.
} args;
typedef struct instruction {
int formatType; // 0 = R, 1 = I, 2 = J
struct instruction* nextInstruction;
struct args* a; // A linked list of each argument of the instruction.
} instruction;