xor di and cpu flags

This commit is contained in:
2025-01-30 18:38:29 -07:00
parent 6a82e9fa03
commit 1bf98447a3
6 changed files with 38 additions and 9 deletions

View File

@ -28,6 +28,8 @@ typedef struct {
bool halted;
bool stepping;
bool int_master_enabled;
} cpu_context;
void cpu_init();
@ -38,4 +40,6 @@ typedef void (*IN_PROC)(cpu_context *);
IN_PROC inst_get_processor(in_type type);
#define CPU_FLAG_Z BIT(ctx->regs.f, 7)
#define CPU_FLAG_C BIT(ctx->regs.f, 4)
#define CPU_FLAG_C BIT(ctx->regs.f, 4)
u16 cpu_read_reg(reg_type rt);