From 9af558a831010c0b2f2ea95864bdc82f5aee996b Mon Sep 17 00:00:00 2001 From: Themis Demetriades Date: Mon, 3 Jun 2024 13:34:29 +0100 Subject: [PATCH] Updated machine struct to simulate 64bit registers --- src/emulator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/emulator.h b/src/emulator.h index 59942df..5a78365 100644 --- a/src/emulator.h +++ b/src/emulator.h @@ -8,7 +8,7 @@ ************************************/ #define BYTE_BITS 8 -#define WORD_BITS 32 +#define WORD_BITS (BYTE_BITS * sizeof(word)) /************************************ * STRUCTS @@ -22,8 +22,8 @@ typedef struct { } PState; typedef struct { - word registers[REGISTER_COUNT]; - word pc; + dword registers[REGISTER_COUNT]; + dword pc; byte *memory; PState conditionCodes; } Machine;