diff --git a/src/rk65c02.c b/src/rk65c02.c index 142de94..973c4d8 100644 --- a/src/rk65c02.c +++ b/src/rk65c02.c @@ -35,25 +35,25 @@ instruction_fetch(bus_t *b, uint16_t addr) /* handle operands */ switch (i.def.mode) { - case ADDR_IMMEDIATE: - case ADDR_ZP: - case ADDR_ZPX: - case ADDR_ZPY: - case ADDR_IZP: - case ADDR_IZPX: - case ADDR_IZPY: - case ADDR_RELATIVE: + case IMMEDIATE: + case ZP: + case ZPX: + case ZPY: + case IZP: + case IZPX: + case IZPY: + case RELATIVE: i.op1 = bus_read_1(b, addr+1); break; - case ADDR_ABSOLUTE: - case ADDR_ABSOLUTEX: - case ADDR_ABSOLUTEY: - case ADDR_IABSOLUTE: - case ADDR_IABSOLUTEX: + case ABSOLUTE: + case ABSOLUTEX: + case ABSOLUTEY: + case IABSOLUTE: + case IABSOLUTEX: i.op1 = bus_read_1(b, addr+1); i.op2 = bus_read_1(b, addr+2); break; - case ADDR_IMPLIED: + case IMPLIED: default: break; } @@ -65,21 +65,49 @@ void instruction_print(instruction_t *i) { switch (i->def.mode) { - case ADDR_IMPLIED: + case IMPLIED: printf("%s", i->def.mnemonic); break; - case ADDR_IMMEDIATE: + case IMMEDIATE: printf("%s #%X", i->def.mnemonic, i->op1); break; - case ADDR_ZP: + case ZP: printf("%s %X", i->def.mnemonic, i->op1); break; - - case ADDR_ABSOLUTE: + case ZPX: + printf("%s %X,X", i->def.mnemonic, i->op1); + break; + case ZPY: + printf("%s %X,Y", i->def.mnemonic, i->op1); + break; + case IZP: + printf("%s (%X)", i->def.mnemonic, i->op1); + break; + case IZPX: + printf("%s (%X,X)", i->def.mnemonic, i->op1); + break; + case IZPY: + printf("%s (%X),Y", i->def.mnemonic, i->op1); + break; + case ABSOLUTE: + printf("%s %02X%02X", i->def.mnemonic, i->op2, i->op1); + break; + case ABSOLUTEX: + printf("%s %02X%02X,X", i->def.mnemonic, i->op2, i->op1); + break; + case ABSOLUTEY: + printf("%s %02X%02X,Y", i->def.mnemonic, i->op2, i->op1); + break; + case IABSOLUTE: + printf("%s (%02X%02X)", i->def.mnemonic, i->op2, i->op1); + break; + case IABSOLUTEX: + printf("%s (%02X%02X,X)", i->def.mnemonic, i->op2, i->op1); + break; + case RELATIVE: printf("%s %02X%02X", i->def.mnemonic, i->op2, i->op1); break; } - } void diff --git a/src/rk65c02.h b/src/rk65c02.h index 3407233..6c4f125 100644 --- a/src/rk65c02.h +++ b/src/rk65c02.h @@ -1,10 +1,27 @@ #ifndef _RK6502_H_ #define _RK6502_H_ +typedef enum { + IMPLIED, + IMMEDIATE, + ZP, + ZPX, + ZPY, + IZP, + IZPX, + IZPY, + RELATIVE, + ABSOLUTE, + ABSOLUTEX, + ABSOLUTEY, + IABSOLUTE, + IABSOLUTEX +} addressing_t; + struct instrdef { uint8_t op; const char *mnemonic; - uint8_t mode; + addressing_t mode; uint8_t size; }; @@ -19,21 +36,6 @@ struct instruction { typedef struct instruction instruction_t; -#define ADDR_IMPLIED 1 -#define ADDR_IMMEDIATE 2 -#define ADDR_ZP 3 -#define ADDR_ZPX 4 -#define ADDR_ZPY 5 -#define ADDR_IZP 6 -#define ADDR_IZPX 7 -#define ADDR_IZPY 8 -#define ADDR_RELATIVE 9 -#define ADDR_ABSOLUTE 10 -#define ADDR_ABSOLUTEX 11 -#define ADDR_ABSOLUTEY 12 -#define ADDR_IABSOLUTE 13 -#define ADDR_IABSOLUTEX 14 - #define OP_BRK 0x00 #define OP_TSB_ZP 0x04 @@ -46,263 +48,263 @@ typedef struct instruction instruction_t; #define OP_UNIMPL 0xFF const struct instrdef instrs[] = { - { OP_BRK, "brk", ADDR_IMPLIED, 1 }, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_NOP, "nop", ADDR_IMMEDIATE, 2}, /* invalid */ - { OP_NOP, "nop", ADDR_IMPLIED, 1}, /* invalid */ - { OP_TSB_ZP, "tsb", ADDR_ZP, 2}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_JSR, "jsr", ADDR_ABSOLUTE, 3}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_LDY_IMM, "ldy", ADDR_IMMEDIATE, 2}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_STP, "stp", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_INX, "inx", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_NOP, "nop", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpl", ADDR_IMPLIED, 1}, - { OP_UNIMPL, "unimpllast", ADDR_IMPLIED, 1} + { OP_BRK, "brk", IMPLIED, 1 }, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_NOP, "nop", IMMEDIATE, 2}, /* inv */ + { OP_NOP, "nop", IMPLIED, 1}, /* inv */ + { OP_TSB_ZP, "tsb", ZP, 2}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_JSR, "jsr", ABSOLUTE, 3}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_LDY_IMM, "ldy", IMMEDIATE, 2}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_STP, "stp", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_INX, "inx", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_NOP, "nop", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpl", IMPLIED, 1}, + { OP_UNIMPL, "unimpllast", IMPLIED, 1} };