8 static char *opcodes[256] = {
17 [0x08] "LD (%.4x),SP",
63 [0x36] "LD (HL),%.2x",
205 [0xC4] "CALL NZ,%.4x",
213 [0xCC] "CALL Z,%.4x",
221 [0xD4] "CALL NC,%.4x",
229 [0xDC] "CALL C,%.4x",
233 [0xE0] "LD (ff%.2x),A",
241 [0xE8] "ADD SP,%.2x",
243 [0xEA] "LD (%.4x),A",
249 [0xF0] "LD A,(ff%.2x)",
257 [0xF8] "LDHL SP,%.2x",
259 [0xFA] "LD A,(%.4x)",
267 static int operands[256] = {
526 static char *cbopcodes[256] = {
793 op = memread(addr + 1);
794 print("%s\n", cbopcodes[op]);
797 switch(operands[op]){
802 print(opcodes[op], (int)(memread(addr + 1)));
805 x = (uint)memread(addr + 2);
807 x |= (uint)memread(addr + 1);
808 print(opcodes[op], x);