Updated machine struct to simulate 64bit registers

This commit is contained in:
Themis Demetriades 2024-06-03 13:34:29 +01:00
parent 7224903ea6
commit 9af558a831

View File

@ -8,7 +8,7 @@
************************************/ ************************************/
#define BYTE_BITS 8 #define BYTE_BITS 8
#define WORD_BITS 32 #define WORD_BITS (BYTE_BITS * sizeof(word))
/************************************ /************************************
* STRUCTS * STRUCTS
@ -22,8 +22,8 @@ typedef struct {
} PState; } PState;
typedef struct { typedef struct {
word registers[REGISTER_COUNT]; dword registers[REGISTER_COUNT];
word pc; dword pc;
byte *memory; byte *memory;
PState conditionCodes; PState conditionCodes;
} Machine; } Machine;