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