#include "enums.h"
static const uint8_t optype[0x100] = {
[CPS_IMP ] = IMPL,
[ADC_IMM ] = IMM,
[ROR_IMM ] = IMM,
[CPB_IMM ] = IMM,
[ADC_Z ] = ZM,
[ROR_Z ] = ZM,
[CPB_Z ] = ZM,
[CLC_IMP ] = IMPL,
[TAB_IMP ] = IMPL,
[STY_Z ] = ZM,
[JMP_AB ] = ABS,
[ADC_AB ] = ABS,
[ROR_AB ] = ABS,
[CPB_AB ] = ABS,
[ADC_B ] = BREG,
[ROR_B ] = BREG,
[STY_AB ] = ABS,
[SEC_IMP ] = IMPL,
[TBA_IMP ] = IMPL,
[JMP_Z ] = ZM,
[SBC_IMM ] = IMM,
[MUL_IMM ] = IMM,
[CPX_IMM ] = IMM,
[SBC_Z ] = ZM,
[MUL_Z ] = ZM,
[CPX_Z ] = ZM,
[CLI_IMP ] = IMPL,
[TAY_IMP ] = IMPL,
[STA_Z ] = ZM,
[STA_ZX ] = ZMX,
[JSR_AB ] = ABS,
[SBC_AB ] = ABS,
[MUL_AB ] = ABS,
[CPX_AB ] = ABS,
[SBC_B ] = BREG,
[MUL_B ] = BREG,
[STA_AB ] = ABS,
[SEI_IMP ] = IMPL,
[TYA_IMP ] = IMPL,
[STA_ZY ] = ZMY,
[STA_IX ] = INDX,
[JSR_Z ] = ZM,
[AND_IMM ] = IMM,
[DIV_IMM ] = IMM,
[CPY_IMM ] = IMM,
[AND_Z ] = ZM,
[DIV_Z ] = ZM,
[CPY_Z ] = ZM,
[CLV_IMP ] = IMPL,
[TAX_IMP ] = IMPL,
[STB_Z ] = ZM,
[STB_ZX ] = ZMX,
[RTS_IMP ] = IMPL,
[AND_AB ] = ABS,
[DIV_AB ] = ABS,
[CPY_AB ] = ABS,
[AND_B ] = BREG,
[DIV_B ] = BREG,
[STB_AB ] = ABS,
[WAI_IMP ] = IMPL,
[TXA_IMP ] = IMPL,
[STB_ZY ] = ZMY,
[STB_IX ] = INDX,
[RTI_IMP ] = IMPL,
[ORA_IMM ] = IMM,
[ASR_IMM ] = IMM,
[LDX_IMM ] = IMM,
[ORA_Z ] = ZM,
[ASR_Z ] = ZM,
[LDX_Z ] = ZM,
[BRK_IMP ] = IMPL,
[TYX_IMP ] = IMPL,
[STX_Z ] = ZM,
[PHP_IMP ] = IMPL,
[BPO_REL ] = REL,
[ORA_AB ] = ABS,
[ASR_AB ] = ABS,
[LDX_AB ] = ABS,
[ORA_B ] = BREG,
[ASR_B ] = BREG,
[STX_AB ] = ABS,
[DEY_IMP ] = IMPL,
[TXY_IMP ] = IMPL,
[CPB_IN ] = IND,
[PLP_IMP ] = IMPL,
[BNG_REL ] = REL,
[XOR_IMM ] = IMM,
[CMP_IMM ] = IMM,
[DEC_IMP ] = IMPL,
[XOR_Z ] = ZM,
[CMP_Z ] = ZM,
[DEC_Z ] = ZM,
[INY_IMP ] = IMPL,
[TSX_IMP ] = IMPL,
[CMP_IN ] = IND,
[PHA_IMP ] = IMPL,
[BCS_REL ] = REL,
[XOR_AB ] = ABS,
[CMP_AB ] = ABS,
[DEC_AB ] = ABS,
[XOR_B ] = BREG,
[CMP_B ] = BREG,
[DEB_IMP ] = IMPL,
[TXS_IMP ] = IMPL,
[STY_IN ] = IND,
[PLA_IMP ] = IMPL,
[BCC_REL ] = REL,
[LSL_IMM ] = IMM,
[LDY_IMM ] = IMM,
[INC_IMP ] = IMPL,
[LSL_Z ] = ZM,
[LDY_Z ] = ZM,
[INC_Z ] = ZM,
[INB_IMP ] = IMPL,
[CMP_IX ] = INDX,
[LDY_IN ] = IND,
[PHB_IMP ] = IMPL,
[BEQ_REL ] = REL,
[LSL_AB ] = ABS,
[LDY_AB ] = ABS,
[INC_AB ] = ABS,
[LSL_B ] = BREG,
[DEX_IMP ] = IMPL,
[CPB_IX ] = INDX,
[LDX_IN ] = IND,
[PLB_IMP ] = IMPL,
[BNE_REL ] = REL,
[LSR_IMM ] = IMM,
[LDA_IMM ] = IMM,
[LDA_IN ] = IND,
[LSR_Z ] = ZM,
[LDA_Z ] = ZM,
[LDA_ZX ] = ZMX,
[INX_IMP ] = IMPL,
[STA_IY ] = INDY,
[STX_IN ] = IND,
[PHY_IMP ] = IMPL,
[BVS_REL ] = REL,
[LSR_AB ] = ABS,
[LDA_AB ] = ABS,
[STA_IN ] = IND,
[LSR_B ] = BREG,
[LDA_ZY ] = ZMY,
[LDA_IX ] = INDX,
[LDA_IY ] = INDY,
[STB_IY ] = INDY,
[JSR_IN ] = IND,
[PLY_IMP ] = IMPL,
[BVC_REL ] = REL,
[ROL_IMM ] = IMM,
[LDB_IMM ] = IMM,
[LDB_IN ] = IND,
[ROL_Z ] = ZM,
[LDB_Z ] = ZM,
[LDB_ZX ] = ZMX,
[LDB_IY ] = INDY,
[NOP_IMP ] = IMPL,
[JMP_IN ] = IND,
[PHX_IMP ] = IMPL,
[BRA_REL ] = REL,
[ROL_AB ] = ABS,
[LDB_AB ] = ABS,
[STB_IN ] = IND,
[ROL_B ] = BREG,
[LDB_ZY ] = ZMY,
[LDB_IX ] = INDX,
[CMP_IY ] = INDY,
[CPB_IY ] = INDY,
[PLX_IMP ] = IMPL
};
static const uint8_t ext_optype[0x100] = {
[LEA_AY ] = ABSY,
[ADD_IMM] = IMM,
[LEA_Z ] = ZM,
[CPE_IMM] = IMM,
[CLZ_Z ] = ZM,
[ADD_Z ] = ZM,
[STB_E ] = EIND,
[CPE_Z ] = ZM,
[LNG_IMM] = IMM,
[LNG_E ] = EIND,
[JMP_E ] = EIND,
[ADC_E ] = EIND,
[ROR_E ] = EIND,
[LEA_AB ] = ABS,
[CLZ_AB ] = ABS,
[ADD_AB ] = ABS,
[LEA_ZY ] = ZMY,
[CPE_AB ] = ABS,
[CLZ_E ] = EIND,
[ADD_E ] = EIND,
[LDX_E ] = EIND,
[SNG_E ] = EIND,
[PEA_AY ] = ABSY,
[SUB_IMM] = IMM,
[PEA_Z ] = ZM,
[CLO_Z ] = ZM,
[SUB_Z ] = ZM,
[STX_E ] = EIND,
[ICE_Z ] = ZM,
[LPO_IMM] = IMM,
[LPO_E ] = EIND,
[JSR_E ] = EIND,
[SBC_E ] = EIND,
[MUL_E ] = EIND,
[PEA_AB ] = ABS,
[CLO_AB ] = ABS,
[SUB_AB ] = ABS,
[PEA_ZY ] = ZMY,
[ICE_AB ] = ABS,
[CLO_E ] = EIND,
[SUB_E ] = EIND,
[CPB_E ] = EIND,
[ICE_E ] = EIND,
[SPO_E ] = EIND,
[LDS_IMM] = IMM,
[LEA_AI ] = AIND,
[LDS_Z ] = ZM,
[ADE_IMM] = IMM,
[LEA_IN ] = IND,
[BIT_Z ] = ZM,
[ADE_Z ] = ZM,
[CPX_E ] = EIND,
[LLM_Z ] = ZM,
[LCS_IMM] = IMM,
[LCS_E ] = EIND,
[LDS_AB ] = ABS,
[AND_E ] = EIND,
[DIV_E ] = EIND,
[LEA_AX ] = ABSX,
[LDS_E ] = EIND,
[BIT_AB ] = ABS,
[ADE_AB ] = ABS,
[LEA_ZX ] = ZMX,
[LLM_AB ] = ABS,
[BIT_E ] = EIND,
[CPY_E ] = EIND,
[LLM_E ] = EIND,
[SCS_E ] = EIND,
[SCO_IMM] = IMM,
[PEA_AI ] = AIND,
[SCO_Z ] = ZM,
[SBE_IMM] = IMM,
[PEA_IN ] = IND,
[SBE_Z ] = ZM,
[PHE_IMP] = IMPL,
[LRM_Z ] = ZM,
[LCC_IMM] = IMM,
[LCC_E ] = EIND,
[SCO_AB ] = ABS,
[ORA_E ] = EIND,
[ASR_E ] = EIND,
[PEA_AX ] = ABSX,
[SCO_E ] = EIND,
[SBE_AB ] = ABS,
[PEA_ZX ] = ZMX,
[LRM_AB ] = ABS,
[PLE_IMP] = IMPL,
[LRM_E ] = EIND,
[SCC_E ] = EIND,
[ECO_IMM] = IMM,
[DEC_E ] = EIND,
[LEA_AIY] = AINDY,
[ECO_Z ] = ZM,
[ADS_IMM] = IMM,
[LEA_IY ] = INDY,
[ADS_Z ] = ZM,
[DEE_IMP] = IMPL,
[RLM_Z ] = ZM,
[LEQ_IMM] = IMM,
[LEQ_E ] = EIND,
[ECO_AB ] = ABS,
[XOR_E ] = EIND,
[CMP_E ] = EIND,
[LEA_AIX] = AINDX,
[ECO_E ] = EIND,
[ADS_AB ] = ABS,
[LEA_IX ] = INDX,
[RLM_AB ] = ABS,
[ADS_E ] = EIND,
[INE_IMP] = IMPL,
[RLM_E ] = EIND,
[SEQ_E ] = EIND,
[INC_E ] = EIND,
[PEA_AIY] = AINDY,
[STS_Z ] = ZM,
[SBS_IMM] = IMM,
[PEA_IY ] = INDY,
[SBS_Z ] = ZM,
[DES_IMP] = IMPL,
[RRM_Z ] = ZM,
[LNE_IMM] = IMM,
[LNE_E ] = EIND,
[STS_AB ] = ABS,
[LSL_E ] = EIND,
[LDY_E ] = EIND,
[PEA_AIX] = AINDX,
[STS_E ] = EIND,
[SBS_AB ] = ABS,
[PEA_IX ] = INDX,
[RRM_AB ] = ABS,
[SBS_E ] = EIND,
[INS_IMP] = IMPL,
[RRM_E ] = EIND,
[REP_REL] = REL,
[SNE_E ] = EIND,
[STY_E ] = EIND,
[STE_Z ] = ZM,
[NOT_A ] = IMPL,
[NOT_Z ] = ZM,
[MMV_IMP] = IMPL,
[ARM_Z ] = ZM,
[REQ_REL] = REL,
[STE_AB ] = ABS,
[LSR_E ] = EIND,
[LDA_E ] = EIND,
[NOT_AB ] = ABS,
[ARM_AB ] = ABS,
[NOT_E ] = EIND,
[ARM_E ] = EIND,
[RNE_REL] = REL,
[STA_E ] = EIND,
[STZ_Z ] = ZM,
[SWP_A ] = IMPL,
[SWP_Z ] = ZM,
[PCN_Z ] = ZM,
[STZ_AB ] = ABS,
[ROL_E ] = EIND,
[LDB_E ] = EIND,
[STZ_E ] = EIND,
[SWP_AB ] = ABS,
[PCN_AB ] = ABS,
[SWP_E ] = EIND,
[PCN_E ] = EIND
};