mirror of
https://github.com/Alvin-Zilverstand/bob16.git
synced 2026-11-25 05:32: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 <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
typedef uint16_t ureg_t;
|
||||||
typedef int16_t reg_t;
|
typedef int16_t reg_t;
|
||||||
|
|
||||||
typedef enum INSTRUCTION_E {
|
typedef enum INSTRUCTION_E {
|
||||||
@@ -151,15 +152,15 @@ typedef struct alu_t {
|
|||||||
|
|
||||||
struct cpu_t {
|
struct cpu_t {
|
||||||
reg_t regFile[8];
|
reg_t regFile[8];
|
||||||
reg_t ir;
|
ureg_t ir;
|
||||||
reg_t pc;
|
ureg_t pc;
|
||||||
bool cc[3];
|
bool cc[3];
|
||||||
alu_t alu;
|
alu_t alu;
|
||||||
} cpu;
|
} cpu;
|
||||||
|
|
||||||
struct ram_t {
|
struct ram_t {
|
||||||
int16_t memory[0x10000];
|
int16_t memory[0x10000];
|
||||||
reg_t mar;
|
ureg_t mar;
|
||||||
reg_t mdr;
|
reg_t mdr;
|
||||||
} ram;
|
} ram;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user