1
0
Fork 0
mirror of https://github.com/pnx/m16vm synced 2026-06-16 03:44:55 +02:00

cpu: remove CPU_FLAGS_HALT (and flag variable from struct cpu_state).

we can get handle cpu halts without this flag. CPU's dont actually have these. exceptions are actually implemented as interrupts in real hardware.
This commit is contained in:
Henrik Hautakoski 2019-04-26 13:32:57 +02:00
parent 76a72e6857
commit 0a58a7857f
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA
2 changed files with 6 additions and 18 deletions

View file

@ -25,8 +25,6 @@
#define CPU_NUM_REGS 16
#define CPU_FLAGS_HALT (1<<0)
struct cpu_state {
// Registers r0, r15
int16_t reg[CPU_NUM_REGS];
@ -34,9 +32,6 @@ struct cpu_state {
// Program counter
uint16_t pc;
// flags
unsigned char flags;
// Instruction
unsigned char *instr_mem;
unsigned long instr_cnt;