diff options
author | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-04-11 13:30:17 +1000 |
---|---|---|
committer | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-04-11 13:30:17 +1000 |
commit | 07980e780e331352ea81d0176d9028325968a771 (patch) | |
tree | 8364d564b93ca7abbb190a308abaf205bdb04487 /instruction-init.h | |
parent | 3f3574efb1e1c27d2f471c9b4a87a9786326e773 (diff) |
interpreter.c can run, but segfaults.
Diffstat (limited to 'instruction-init.h')
-rw-r--r-- | instruction-init.h | 7 |
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; } |