From 07980e780e331352ea81d0176d9028325968a771 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Tue, 11 Apr 2023 13:30:17 +1000 Subject: interpreter.c can run, but segfaults. --- instruction-init.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'instruction-init.h') diff --git a/instruction-init.h b/instruction-init.h index 01b3fd8..ccfbc85 100644 --- a/instruction-init.h +++ b/instruction-init.h @@ -15,8 +15,13 @@ void setIT(int i, uintptr_t p, Addressing r){ *r1 = r; } +uintptr_t getITFunction(int i){ + Addressing* r = (IT + (sizeof(uintptr_t)*i)); + return *r; +} + Addressing getITAddressing(int i){ - Addressing* r = IT + (sizeof(uintptr_t)*256)) + (sizeof(Addressing)*i) + Addressing* r = (IT + (sizeof(uintptr_t)*256) + (sizeof(Addressing)*i)); return *r; } -- cgit v1.2.3