jump and nop instructions.

This commit is contained in:
2025-01-30 17:03:56 -07:00
parent cd588671c4
commit ba56bd2491
5 changed files with 130 additions and 8 deletions

View File

@ -31,4 +31,11 @@ typedef struct {
} cpu_context;
void cpu_init();
bool cpu_step();
bool cpu_step();
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)

View File

@ -108,4 +108,6 @@ typedef struct {
u8 param;
} instruction;
instruction *instruction_by_opcode(u8 opcode);
instruction *instruction_by_opcode(u8 opcode);
char *inst_name(in_type t);