Add highlighting, fixed len instructions and more
This commit is contained in:
@@ -23,13 +23,16 @@
|
||||
#define CPU_MODE_STEP (1 << 4)
|
||||
#define CPU_MODE_SECOND (1 << 5)
|
||||
|
||||
#define CPU_INSTRUCTION_SIZE 8 //Biggest instruction
|
||||
|
||||
|
||||
// CPU state
|
||||
typedef struct {
|
||||
uint8_t regs[REG_COUNT];
|
||||
uint8_t memory[MEM_SIZE];
|
||||
uint32_t pc; // Program counter
|
||||
uint32_t stack[STACK_SIZE]; // Stack pointer
|
||||
uint32_t addrToLineMapper[MEM_SIZE / CPU_INSTRUCTION_SIZE];
|
||||
uint32_t pc; // Program counter
|
||||
uint32_t stack_ptr; // Stack pointer
|
||||
uint8_t flags; // Status flags
|
||||
uint8_t mode;
|
||||
|
Reference in New Issue
Block a user