summaryrefslogtreecommitdiff
path: root/instruction-init.h
diff options
context:
space:
mode:
authoralekseiplusplus <alekseijeaves@protonmail.com>2023-04-11 13:30:17 +1000
committeralekseiplusplus <alekseijeaves@protonmail.com>2023-04-11 13:30:17 +1000
commit07980e780e331352ea81d0176d9028325968a771 (patch)
tree8364d564b93ca7abbb190a308abaf205bdb04487 /instruction-init.h
parent3f3574efb1e1c27d2f471c9b4a87a9786326e773 (diff)
interpreter.c can run, but segfaults.
Diffstat (limited to 'instruction-init.h')
-rw-r--r--instruction-init.h7
1 files changed, 6 insertions, 1 deletions
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;
}