| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #ifndef _OPCODE_M68HC11_H |
| #define _OPCODE_M68HC11_H |
|
|
| |
| #define M6811_S_BIT 0x80 |
| #define M6811_X_BIT 0x40 |
| #define M6811_H_BIT 0x20 |
| #define M6811_I_BIT 0x10 |
| #define M6811_N_BIT 0x08 |
| #define M6811_Z_BIT 0x04 |
| #define M6811_V_BIT 0x02 |
| #define M6811_C_BIT 0x01 |
|
|
| |
| |
| |
| |
| |
| |
| #define M6811_PORTA 0x00 |
| #define M6811__RES1 0x01 |
| #define M6811_PIOC 0x02 |
| #define M6811_PORTC 0x03 |
| #define M6811_PORTB 0x04 |
| #define M6811_PORTCL 0x05 |
| #define M6811__RES6 0x06 |
| #define M6811_DDRC 0x07 |
| #define M6811_PORTD 0x08 |
| #define M6811_DDRD 0x09 |
| #define M6811_PORTE 0x0A |
| #define M6811_CFORC 0x0B |
| #define M6811_OC1M 0x0C |
| #define M6811_OC1D 0x0D |
| #define M6811_TCTN 0x0E |
| #define M6811_TCTN_H 0x0E |
| #define M6811_TCTN_L 0x0F |
| #define M6811_TIC1 0x10 |
| #define M6811_TIC1_H 0x10 |
| #define M6811_TIC1_L 0x11 |
| #define M6811_TIC2 0x12 |
| #define M6811_TIC2_H 0x12 |
| #define M6811_TIC2_L 0x13 |
| #define M6811_TIC3 0x14 |
| #define M6811_TIC3_H 0x14 |
| #define M6811_TIC3_L 0x15 |
| #define M6811_TOC1 0x16 |
| #define M6811_TOC1_H 0x16 |
| #define M6811_TOC1_L 0x17 |
| #define M6811_TOC2 0x18 |
| #define M6811_TOC2_H 0x18 |
| #define M6811_TOC2_L 0x19 |
| #define M6811_TOC3 0x1A |
| #define M6811_TOC3_H 0x1A |
| #define M6811_TOC3_L 0x1B |
| #define M6811_TOC4 0x1C |
| #define M6811_TOC4_H 0x1C |
| #define M6811_TOC4_L 0x1D |
| #define M6811_TOC5 0x1E |
| #define M6811_TOC5_H 0x1E |
| #define M6811_TOC5_L 0x1F |
| #define M6811_TCTL1 0x20 |
| #define M6811_TCTL2 0x21 |
| #define M6811_TMSK1 0x22 |
| #define M6811_TFLG1 0x23 |
| #define M6811_TMSK2 0x24 |
| #define M6811_TFLG2 0x25 |
| #define M6811_PACTL 0x26 |
| #define M6811_PACNT 0x27 |
| #define M6811_SPCR 0x28 |
| #define M6811_SPSR 0x29 |
| #define M6811_SPDR 0x2A |
| #define M6811_BAUD 0x2B |
| #define M6811_SCCR1 0x2C |
| #define M6811_SCCR2 0x2D |
| #define M6811_SCSR 0x2E |
| #define M6811_SCDR 0x2F |
| #define M6811_ADCTL 0x30 |
| #define M6811_ADR1 0x31 |
| #define M6811_ADR2 0x32 |
| #define M6811_ADR3 0x33 |
| #define M6811_ADR4 0x34 |
| #define M6811__RES35 0x35 |
| #define M6811__RES36 0x36 |
| #define M6811__RES37 0x37 |
| #define M6811__RES38 0x38 |
| #define M6811_OPTION 0x39 |
| #define M6811_COPRST 0x3A |
| #define M6811_PPROG 0x3B |
| #define M6811_HPRIO 0x3C |
| #define M6811_INIT 0x3D |
| #define M6811_TEST1 0x3E |
| #define M6811_CONFIG 0x3F |
|
|
|
|
| |
| #define M6811_NOSEC 0x08 |
| #define M6811_NOCOP 0x04 |
| #define M6811_ROMON 0x02 |
| #define M6811_EEON 0x01 |
|
|
| |
| #define M6811_BYTE 0x10 |
| #define M6811_ROW 0x08 |
| #define M6811_ERASE 0x04 |
| #define M6811_EELAT 0x02 |
| #define M6811_EEPGM 0x01 |
|
|
| |
| #define M6811_STAF 0x80 |
| #define M6811_STAI 0x40 |
| #define M6811_CWOM 0x20 |
| #define M6811_HNDS 0x10 |
| #define M6811_OIN 0x08 |
| #define M6811_PLS 0x04 |
| #define M6811_EGA 0x02 |
| #define M6811_INVB 0x01 |
|
|
| |
| #define M6811_R8 0x80 |
| #define M6811_T8 0x40 |
| #define M6811__SCCR1_5 0x20 |
| #define M6811_M 0x10 |
| #define M6811_WAKE 0x08 |
|
|
| |
| #define M6811_TIE 0x80 |
| #define M6811_TCIE 0x40 |
| #define M6811_RIE 0x20 |
| #define M6811_ILIE 0x10 |
| #define M6811_TE 0x08 |
| #define M6811_RE 0x04 |
| #define M6811_RWU 0x02 |
| #define M6811_SBK 0x01 |
|
|
| |
| #define M6811_TDRE 0x80 |
| #define M6811_TC 0x40 |
| #define M6811_RDRF 0x20 |
| #define M6811_IDLE 0x10 |
| #define M6811_OR 0x08 |
| #define M6811_NF 0x04 |
| #define M6811_FE 0x02 |
| #define M6811__SCSR_0 0x01 |
|
|
| |
| #define M6811_TCLR 0x80 |
| #define M6811__BAUD_6 0x40 |
| #define M6811_SCP1 0x20 |
| #define M6811_SCP0 0x10 |
| #define M6811_RCKB 0x08 |
| #define M6811_SCR2 0x04 |
| #define M6811_SCR1 0x02 |
| #define M6811_SCR0 0x01 |
|
|
| #define M6811_BAUD_DIV_1 (0) |
| #define M6811_BAUD_DIV_3 (M6811_SCP0) |
| #define M6811_BAUD_DIV_4 (M6811_SCP1) |
| #define M6811_BAUD_DIV_13 (M6811_SCP1|M6811_SCP0) |
|
|
| |
| #define M6811_SPIE 0x80 |
| #define M6811_SPE 0x40 |
| #define M6811_DWOM 0x20 |
| #define M6811_MSTR 0x10 |
| #define M6811_CPOL 0x08 |
| #define M6811_CPHA 0x04 |
| #define M6811_SPR1 0x02 |
| #define M6811_SPR0 0x01 |
|
|
| |
| #define M6811_SPIF 0x80 |
| #define M6811_WCOL 0x40 |
| #define M6811_MODF 0x10 |
|
|
| |
| #define M6811_CCF 0x80 |
| #define M6811_SCAN 0x20 |
| #define M6811_MULT 0x10 |
| #define M6811_CD 0x08 |
| #define M6811_CC 0x04 |
| #define M6811_CB 0x02 |
| #define M6811_CA 0x01 |
|
|
| |
| #define M6811_FOC1 0x80 |
| #define M6811_FOC2 0x40 |
| #define M6811_FOC3 0x20 |
| #define M6811_FOC4 0x10 |
| #define M6811_FOC5 0x08 |
|
|
| |
| #define M6811_OC1M7 0x80 |
| #define M6811_OC1M6 0x40 |
| #define M6811_OC1M5 0x20 |
| #define M6811_OC1M4 0x10 |
| #define M6811_OC1M3 0x08 |
|
|
| |
| #define M6811_OC1D7 0x80 |
| #define M6811_OC1D6 0x40 |
| #define M6811_OC1D5 0x20 |
| #define M6811_OC1D4 0x10 |
| #define M6811_OC1D3 0x08 |
|
|
| |
| #define M6811_OM2 0x80 |
| #define M6811_OL2 0x40 |
| #define M6811_OM3 0x20 |
| #define M6811_OL3 0x10 |
| #define M6811_OM4 0x08 |
| #define M6811_OL4 0x04 |
| #define M6811_OM5 0x02 |
| #define M6811_OL5 0x01 |
|
|
| |
| #define M6811_EDG1B 0x20 |
| #define M6811_EDG1A 0x10 |
| #define M6811_EDG2B 0x08 |
| #define M6811_EDG2A 0x04 |
| #define M6811_EDG3B 0x02 |
| #define M6811_EDG3A 0x01 |
|
|
| |
| #define M6811_OC1I 0x80 |
| #define M6811_OC2I 0x40 |
| #define M6811_OC3I 0x20 |
| #define M6811_OC4I 0x10 |
| #define M6811_OC5I 0x08 |
| #define M6811_IC1I 0x04 |
| #define M6811_IC2I 0x02 |
| #define M6811_IC3I 0x01 |
|
|
| |
| #define M6811_OC1F 0x80 |
| #define M6811_OC2F 0x40 |
| #define M6811_OC3F 0x20 |
| #define M6811_OC4F 0x10 |
| #define M6811_OC5F 0x08 |
| #define M6811_IC1F 0x04 |
| #define M6811_IC2F 0x02 |
| #define M6811_IC3F 0x01 |
|
|
| |
| #define M6811_TOI 0x80 |
| #define M6811_RTII 0x40 |
| #define M6811_PAOVI 0x20 |
| #define M6811_PAII 0x10 |
| #define M6811_PR1 0x02 |
| #define M6811_PR0 0x01 |
| #define M6811_TPR_1 0x00 |
| #define M6811_TPR_4 0x01 |
| #define M6811_TPR_8 0x02 |
| #define M6811_TPR_16 0x03 |
|
|
| |
| #define M6811_TOF 0x80 |
| #define M6811_RTIF 0x40 |
| #define M6811_PAOVF 0x20 |
| #define M6811_PAIF 0x10 |
|
|
| |
| #define M6811_DDRA7 0x80 |
| #define M6811_PAEN 0x40 |
| #define M6811_PAMOD 0x20 |
| #define M6811_PEDGE 0x10 |
| #define M6811_RTR1 0x02 |
| #define M6811_RTR0 0x01 |
|
|
| |
| #define M6811_ADPU 0x80 |
| #define M6811_CSEL 0x40 |
| #define M6811_IRQE 0x20 |
| #define M6811_DLY 0x10 |
| #define M6811_CME 0x08 |
| #define M6811_CR1 0x02 |
| #define M6811_CR0 0x01 |
|
|
| |
| #define M6811_RBOOT 0x80 |
| #define M6811_SMOD 0x40 |
| #define M6811_MDA 0x20 |
| #define M6811_IRV 0x10 |
| #define M6811_PSEL3 0x08 |
| #define M6811_PSEL2 0x04 |
| #define M6811_PSEL1 0x02 |
| #define M6811_PSEL0 0x01 |
|
|
| |
| #define M6811_BRA 0x20 |
| #define M6811_JMP 0x7e |
| #define M6811_BSR 0x8d |
| #define M6811_JSR 0xbd |
| #define M6812_JMP 0x06 |
| #define M6812_BSR 0x07 |
| #define M6812_JSR 0x16 |
|
|
| |
| |
| #define M6811_OPCODE_PAGE2 0x18 |
| #define M6811_OPCODE_PAGE3 0x1A |
| #define M6811_OPCODE_PAGE4 0xCD |
|
|
|
|
| |
| |
| |
| #define M6811_OP_NONE 0 |
| #define M6811_OP_DIRECT 0x0001 |
| #define M6811_OP_IMM8 0x0002 |
| #define M6811_OP_IMM16 0x0004 |
| #define M6811_OP_IND16 0x0008 |
| #define M6812_OP_IND16_P2 0x0010 |
| #define M6812_OP_REG 0x0020 |
| #define M6812_OP_REG_2 0x0040 |
|
|
| #define M6811_OP_IX 0x0080 |
| #define M6811_OP_IY 0x0100 |
| #define M6812_OP_IDX 0x0200 |
| #define M6812_OP_IDX_1 0x0400 |
| #define M6812_OP_IDX_2 0x0800 |
| #define M6812_OP_D_IDX 0x1000 |
| #define M6812_OP_D_IDX_2 0x2000 |
| #define M6812_OP_PAGE 0x4000 |
| #define M6811_OP_MASK 0x07FFF |
| #define M6811_OP_BRANCH 0x00008000 |
| #define M6811_OP_BITMASK 0x00010000 |
| #define M6811_OP_JUMP_REL 0x00020000 |
| #define M6812_OP_JUMP_REL16 0x00040000 |
| #define M6811_OP_PAGE1 0x0000 |
| #define M6811_OP_PAGE2 0x00080000 |
| #define M6811_OP_PAGE3 0x00100000 |
| #define M6811_OP_PAGE4 0x00200000 |
| #define M6811_MAX_OPERANDS 3 |
|
|
| #define M6812_ACC_OFFSET 0x00400000 |
| #define M6812_ACC_IND 0x00800000 |
| #define M6812_PRE_INC 0x01000000 |
| #define M6812_PRE_DEC 0x02000000 |
| #define M6812_POST_INC 0x04000000 |
| #define M6812_POST_DEC 0x08000000 |
| #define M6812_INDEXED_IND 0x10000000 |
| #define M6812_INDEXED 0x20000000 |
| #define M6812_OP_IDX_P2 0x40000000 |
|
|
| |
| |
| #define M68XG_OP_NONE 0x0001 |
| #define M68XG_OP_IMM3 0x0002 |
| #define M68XG_OP_R 0x0004 |
| #define M68XG_OP_R_R 0x0008 |
| #define M68XG_OP_R_IMM4 0x0010 |
| #define M68XG_OP_R_R_R 0x0020 |
| #define M68XG_OP_REL9 0x0040 |
| #define M68XG_OP_REL10 0x0080 |
| #define M68XG_OP_R_R_OFFS5 0x0100 |
| #define M68XG_OP_RD_RB_RI 0x0200 |
| #define M68XG_OP_RD_RB_RIp 0x0400 |
| #define M68XG_OP_RD_RB_mRI 0x0800 |
| #define M68XG_OP_R_IMM8 0x1000 |
| #define M68XG_OP_R_IMM16 0x2000 |
| #define M68XG_OP_REG 0x4000 |
| #define M68XG_OP_REG_2 0x8000 |
| #define M68XG_MAX_OPERANDS 3 |
|
|
| |
| #define M6812_OP_EXG_MARKER 0x01000000 |
| #define M6812_OP_TFR_MARKER 0x02000000 |
| #define M6812_OP_SEX_MARKER 0x04000000 |
|
|
| #define M6812_OP_EQ_MARKER 0x80000000 |
| #define M6812_OP_DBCC_MARKER 0x04000000 |
| #define M6812_OP_IBCC_MARKER 0x02000000 |
| #define M6812_OP_TBCC_MARKER 0x01000000 |
|
|
| |
| #define M68XG_OP_B_MARKER 0x04000000 |
| #define M68XG_OP_BRA_MARKER 0x02000000 |
|
|
| #define M6812_OP_TRAP_ID 0x80000000 |
|
|
| #define M6811_OP_HIGH_ADDR 0x01000000 |
| #define M6811_OP_LOW_ADDR 0x02000000 |
|
|
| #define M68HC12_BANK_VIRT 0x010000 |
| #define M68HC12_BANK_MASK 0x00003fff |
| #define M68HC12_BANK_BASE 0x00008000 |
| #define M68HC12_BANK_SHIFT 14 |
| #define M68HC12_BANK_PAGE_MASK 0x0ff |
|
|
|
|
| |
| #define cpu6811 0x01 |
| #define cpu6812 0x02 |
| #define cpu6812s 0x04 |
| #define cpu9s12x 0x08 |
| #define cpuxgate 0x10 |
|
|
| |
| struct m68hc11_opcode |
| { |
| const char * name; |
| long format; |
| unsigned char size; |
| unsigned int opcode; |
| unsigned char cycles_low; |
| unsigned char cycles_high; |
| unsigned char set_flags_mask; |
| unsigned char clr_flags_mask; |
| unsigned char chg_flags_mask; |
| unsigned char arch; |
| unsigned int xg_mask; |
| }; |
|
|
| |
| struct m68hc12_opcode_alias |
| { |
| const char* name; |
| const char* translation; |
| unsigned char size; |
| unsigned char code1; |
| unsigned char code2; |
| }; |
|
|
| |
| |
| extern const struct m68hc11_opcode m68hc11_opcodes[]; |
| extern const int m68hc11_num_opcodes; |
|
|
| |
| |
| extern const struct m68hc12_opcode_alias m68hc12_alias[]; |
| extern const int m68hc12_num_alias; |
|
|
| #endif |
|
|