From e8880935ac1568d964f68f82c94b2bf0efbae0ac Mon Sep 17 00:00:00 2001 From: sBubshait Date: Wed, 29 May 2024 12:22:18 +0100 Subject: [PATCH] Add global.h, w/ EGT --- src/global.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/global.h diff --git a/src/global.h b/src/global.h new file mode 100644 index 0000000..e827bcb --- /dev/null +++ b/src/global.h @@ -0,0 +1,24 @@ +/** + ******************************************************************************** + * @file global.h + * @brief Defines global constants and types used in the assembler and emulator. + ******************************************************************************** + */ + +#ifndef GLOBAL_H +#define GLOBAL_H +#include + +// Number of General Purpose Registers. +#define REGISTER_COUNT 31 +// Size of the memory in bytes. +#define MEMORY_SIZE 2097152 +// Length of the memory address in bits. +#define MEMORY_ADDRESS_LENGTH 21 +// Length of the instruction in bits. +#define INSTRUCTION_SIZE 32 + +// Define the word type to be a 64-bit unsigned integer. +typedef uint64_t word; + +#endif \ No newline at end of file