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IX = 0x3E,
JSR_Z = 0x40,
AND_IMM = 0x41,
DIV_IMM = 0x42,
CPY_IMM = 0x44,
AND_Z = 0x45,
DIV_Z = 0x46,
CPY_Z = 0x48,
CLV_IMP = 0x49,
TAX_IMP = 0x4A,
STB_Z = 0x4C,
STB_ZX = 0x4E,
RTS_IMP = 0x50,
AND_AB = 0x51,
DIV_AB = 0x52,
CPY_AB = 0x54,
AND_B = 0x55,
DIV_B = 0x56,
STB_AB = 0x58,
WAI_IMP = 0x59,
TXA_IMP = 0x5A,
STB_ZY = 0x5C,
STB_IX = 0x5E,
RTI_IMP = 0x60,
ORA_IMM = 0x61,
ASR_IMM = 0x62,
LDX_IMM = 0x64,
ORA_Z = 0x65,
ASR_Z = 0x66,
LDX_Z = 0x68,
BRK_IMP = 0x69,
TYX_IMP = 0x6A,
STX_Z = 0x6C,
PHP_IMP = 0x6E,
BPO_REL = 0x70,
ORA_AB = 0x71,
ASR_AB = 0x72,
LDX_AB = 0x74,
ORA_B = 0x75,
ASR_B = 0x76,
STX_AB = 0x78,
DEY_IMP = 0x79,
TXY_IMP = 0x7A,
CPB_IN = 0x7C,
PLP_IMP = 0x7E,
BNG_REL = 0x80,
XOR_IMM = 0x81,
CMP_IMM = 0x82,
DEC_IMP = 0x84,
XOR_Z = 0x85,
CMP_Z = 0x86,
DEC_Z = 0x88,
INY_IMP = 0x89,
TSX_IMP = 0x8A,
CMP_IN = 0x8C,
PHA_IMP = 0x8E,
BCS_REL = 0x90,
XOR_AB = 0x91,
CMP_AB = 0x92,
DEC_AB = 0x94,
XOR_B = 0x95,
CMP_B = 0x96,
DEB_IMP = 0x99,
TXS_IMM = 0x9A,
STY_IN = 0x9C,
PLA_IMP = 0x9E,
BCC_REL = 0xA0,
LSL_IMM = 0xA1,
LDY_IMM = 0xA2,
INC_IMP = 0xA4,
LSL_Z = 0xA5,
LDY_Z = 0xA6,
INC_Z = 0xA8,
INB_IMP = 0xA9,
CMP_IX = 0xAA,
LDY_IN = 0xAC,
PHB_IMP = 0xAE,
BEQ_REL = 0xB0,
LSL_AB = 0xB1,
LDY_AB = 0xB2,
INC_AB = 0xB4,
LSL_B = 0xB5,
DEX_IMP = 0xB9,
CPB_IX = 0xBA,
LDX_IN = 0xBC,
PLB_IMP = 0xBE,
BNE_REL = 0xC0,
LSR_IMM = 0xC1,
LDA_IMM = 0xC2,
LDA_IN = 0xC4,
LSR_Z = 0xC5,
LDA_Z = 0xC6,
LDA_ZX = 0xC8,
INX_IMP = 0xC9,
STA_IY = 0xCA,
STX_IN = 0xCC,
PHY_IMP = 0xCE,
BVS_REL = 0xD0,
LSR_AB = 0xD1,
LDA_AB = 0xD2,
STA_IN = 0xD4,
LSR_B = 0xD5,
LDA_ZY = 0xD6,
LDA_IX = 0xD8,
LDA_IY = 0xD9,
STB_IY = 0xDA,
JSR_IN = 0xDC,
PLY_IMP = 0xDE,
BVC_REL = 0xE0,
ROL_IMM = 0xE1,
LDB_IMM = 0xE2,
LDB_IN = 0xE4,
ROL_Z = 0xE5,
LDB_Z = 0xE6,
LDB_ZX = 0xE8,
LDB_IY = 0xE9,
NOP_IMP = 0xEA,
JMP_IN = 0xEC,
PHX_IMP = 0xEE,
BRA_REL = 0xF0,
ROL_AB = 0xF1,
LDB_AB = 0xF2,
STB_IN = 0xF4,
ROL_B = 0xF5,
LDB_ZY = 0xF6,
LDB_IX = 0xF8,
CMP_IY = 0xF9,
CPB_IY = 0xFA,
PLX_IMP = 0xFE
};
enum base_ext {
ADC_E = 0x01,
LEA_ZX = 0x02,
LEA_SX = 0x03,
ADD = 0x04,
LLM = 0x05,
PHE = 0x08,
CPB_E = 0x09,
DEC_E = 0x0C,
JMP_E = 0x10,
SBC_E = 0x11,
LEA_ZY = 0x12,
LEA_SY = 0x13,
ADD_E = 0x14,
LLM_Z = 0x15,
CPY_E = 0x19,
INC_E = 0x1C,
JSR_E = 0x20,
AND_E = 0x21,
PEA_ZX = 0x22,
PEA_SX = 0x23,
SUB = 0x24,
LLM_E = 0x25,
PLE = 0x28,
CPX_E = 0x29,
DEE = 0x2C,
BPO_E = 0x30,
ORA_E = 0x31,
PEA_ZY = 0x32,
PEA_SY = 0x33,
SUB_E = 0x34,
LRM = 0x35,
CPE = 0x39,
INE = 0x3C,
BNG_E = 0x40,
XOR_E = 0x41,
LEA_AX = 0x42,
LEA_SI = 0x43,
ADE = 0x44,
LRM_Z = 0x45,
CPE_AB = 0x49,
DES = 0x4C,
BCS_E = 0x50,
LSL_E = 0x51,
LEA_AY = 0x52,
LEA_RE = 0x53,
ADE_A = 0x54,
LRM_E = 0x55,
CPE_Z = 0x59,
INS = 0x5C,
BCC_E = 0x60,
LSR_E = 0x61,
PEA_AX = 0x62,
PEA_SI = 0x63,
SBE = 0x64,
RLM = 0x65,
ICE = 0x69,
BEQ_E = 0x70,
ROL_E = 0x71,
PEA_AY = 0x72,
PEA_RE = 0x73,
RLM_Z = 0x75,
ICE_Z = 0x79,
STE = 0x7C,
BNE_E = 0x80,
ROR_E = 0x81,
LEA_IX = 0x82,
LEA_IN = 0x83,
ADS = 0x84,
RLM_E = 0x85,
ICE_E = 0x89,
STE_Z = 0x8C,
BVS_E = 0x90,
MUL_E = 0x91,
LEA_IY = 0x92,
LEA_AI = 0x93,
ADS_A = 0x94,
RRM = 0x95,
STZ = 0x9C,
BVC_E = 0xA0,
DIV_E = 0xA1,
PEA_IX = 0xA2,
PEA_IN = 0xA3,
SBS = 0xA4,
RRM_ZM = 0xA5,
STZ_ZM = 0xAC,
CMP_E = 0xB1,
PEA_IY = 0xB2,
PEA_AI = 0xB3,
SBS_A = 0xB4,
RRM_E = 0xB5,
LDX_E = 0xB9,
STZ_E = 0xBC,
LDA_E = 0xC1,
LEA_AIX = 0xC2,
LEA_Z = 0xC3,
NOT = 0xC4,
ARM = 0xC5,
LDE = 0xC9,
STA_E = 0xCC,
LDB_E = 0xD1,
LEA_AIY = 0xD2,
LEA = 0xD3,
NOT_AB = 0xD4,
ARM_Z = 0xD5,
LDE_AB = 0xD9,
STB_E = 0xDC,
LDY_E = 0xE1,
PEA_AIX = 0xE2,
PEA_Z = 0xE3,
NOT_Z = 0xE4,
ARM_E = 0xE5,
LDE_Z = 0xE9,
STY_E = 0xEC,
ASR_E = 0xF1,
PEA_AIY = 0xF2,
PEA = 0xF3,
NOT_E = 0xF4,
STX_E = 0xFC,
};