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

@ -19,4 +19,59 @@ instruction *instruction_by_opcode(u8 opcode) {
}
return &instructions[opcode];
}
char *inst_lookup[] = {
"<NONE>",
"NOP",
"LD",
"INC",
"DEC",
"RLCA",
"ADD",
"RRCA",
"STOP",
"RLA",
"JR",
"RRA",
"DAA",
"CPL",
"SCF",
"CCF",
"HALT",
"ADC",
"SUB",
"SBC",
"AND",
"XOR",
"OR",
"CP",
"POP",
"JP",
"PUSH",
"RET",
"CB",
"CALL",
"RETI",
"LDH",
"JPHL",
"DI",
"EI",
"RST",
"IN_ERR",
"IN_RLC",
"IN_RRC",
"IN_RL",
"IN_RR",
"IN_SLA",
"IN_SRA",
"IN_SWAP",
"IN_SRL",
"IN_BIT",
"IN_RES",
"IN_SET"
};
char *inst_name(in_type t) {
return inst_lookup[t];
}