mirror of
https://github.com/Alvin-Zilverstand/bob16.git
synced 2026-11-21 12:52:59 +01:00
pc, ir, and mar should all be unsigned
This commit is contained in:
1 parent
11d12ec3a3
commit
74bda7d8b2
1 file changed
+4
-3
@@ -111,6 +111,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef uint16_t ureg_t;
|
||||
typedef int16_t reg_t;
|
||||
|
||||
typedef enum INSTRUCTION_E {
|
||||
@@ -151,15 +152,15 @@ typedef struct alu_t {
|
||||
|
||||
struct cpu_t {
|
||||
reg_t regFile[8];
|
||||
reg_t ir;
|
||||
reg_t pc;
|
||||
ureg_t ir;
|
||||
ureg_t pc;
|
||||
bool cc[3];
|
||||
alu_t alu;
|
||||
} cpu;
|
||||
|
||||
struct ram_t {
|
||||
int16_t memory[0x10000];
|
||||
reg_t mar;
|
||||
ureg_t mar;
|
||||
reg_t mdr;
|
||||
} ram;
|
||||
|
||||
|
||||
Reference in new issue
Block a user