Rizin
unix-like reverse engineering framework and cli tools
m6805.inc
Go to the documentation of this file.
1 
2 // M68HC05 instructions
3 static const inst_page1 g_m6805_inst_page1_table[256] = {
4  // 0x0x, bit manipulation instructions
5  { M680X_INS_BRSET, opidxdr_hid, inh_hid },
6  { M680X_INS_BRCLR, opidxdr_hid, inh_hid },
7  { M680X_INS_BRSET, opidxdr_hid, inh_hid },
8  { M680X_INS_BRCLR, opidxdr_hid, inh_hid },
9  { M680X_INS_BRSET, opidxdr_hid, inh_hid },
10  { M680X_INS_BRCLR, opidxdr_hid, inh_hid },
11  { M680X_INS_BRSET, opidxdr_hid, inh_hid },
12  { M680X_INS_BRCLR, opidxdr_hid, inh_hid },
13  { M680X_INS_BRSET, opidxdr_hid, inh_hid },
14  { M680X_INS_BRCLR, opidxdr_hid, inh_hid },
15  { M680X_INS_BRSET, opidxdr_hid, inh_hid },
16  { M680X_INS_BRCLR, opidxdr_hid, inh_hid },
17  { M680X_INS_BRSET, opidxdr_hid, inh_hid },
18  { M680X_INS_BRCLR, opidxdr_hid, inh_hid },
19  { M680X_INS_BRSET, opidxdr_hid, inh_hid },
20  { M680X_INS_BRCLR, opidxdr_hid, inh_hid },
21  // 0x1x, bit set/clear instructions
22  { M680X_INS_BCLR, opidx_hid, dir_hid },
23  { M680X_INS_BSET, opidx_hid, dir_hid },
24  { M680X_INS_BCLR, opidx_hid, dir_hid },
25  { M680X_INS_BSET, opidx_hid, dir_hid },
26  { M680X_INS_BCLR, opidx_hid, dir_hid },
27  { M680X_INS_BSET, opidx_hid, dir_hid },
28  { M680X_INS_BCLR, opidx_hid, dir_hid },
29  { M680X_INS_BSET, opidx_hid, dir_hid },
30  { M680X_INS_BCLR, opidx_hid, dir_hid },
31  { M680X_INS_BSET, opidx_hid, dir_hid },
32  { M680X_INS_BCLR, opidx_hid, dir_hid },
33  { M680X_INS_BSET, opidx_hid, dir_hid },
34  { M680X_INS_BCLR, opidx_hid, dir_hid },
35  { M680X_INS_BSET, opidx_hid, dir_hid },
36  { M680X_INS_BCLR, opidx_hid, dir_hid },
37  { M680X_INS_BSET, opidx_hid, dir_hid },
38  // 0x2x, relative branch instructions
39  { M680X_INS_BRA, rel8_hid, inh_hid },
40  { M680X_INS_BRN, rel8_hid, inh_hid },
41  { M680X_INS_BHI, rel8_hid, inh_hid },
42  { M680X_INS_BLS, rel8_hid, inh_hid },
43  { M680X_INS_BCC, rel8_hid, inh_hid },
44  { M680X_INS_BCS, rel8_hid, inh_hid },
45  { M680X_INS_BNE, rel8_hid, inh_hid },
46  { M680X_INS_BEQ, rel8_hid, inh_hid },
47  { M680X_INS_BHCC, rel8_hid, inh_hid },
48  { M680X_INS_BHCS, rel8_hid, inh_hid },
49  { M680X_INS_BPL, rel8_hid, inh_hid },
50  { M680X_INS_BMI, rel8_hid, inh_hid },
51  { M680X_INS_BMC, rel8_hid, inh_hid },
52  { M680X_INS_BMS, rel8_hid, inh_hid },
53  { M680X_INS_BIL, rel8_hid, inh_hid },
54  { M680X_INS_BIH, rel8_hid, inh_hid },
55  // 0x3x, direct instructions
56  { M680X_INS_NEG, dir_hid, inh_hid },
57  { M680X_INS_ILLGL, illgl_hid, inh_hid },
58  { M680X_INS_ILLGL, illgl_hid, inh_hid },
59  { M680X_INS_COM, dir_hid, inh_hid },
60  { M680X_INS_LSR, dir_hid, inh_hid },
61  { M680X_INS_ILLGL, illgl_hid, inh_hid },
62  { M680X_INS_ROR, dir_hid, inh_hid },
63  { M680X_INS_ASR, dir_hid, inh_hid },
64  { M680X_INS_LSL, dir_hid, inh_hid },
65  { M680X_INS_ROL, dir_hid, inh_hid },
66  { M680X_INS_DEC, dir_hid, inh_hid },
67  { M680X_INS_ILLGL, illgl_hid, inh_hid },
68  { M680X_INS_INC, dir_hid, inh_hid },
69  { M680X_INS_TST, dir_hid, inh_hid },
70  { M680X_INS_ILLGL, illgl_hid, inh_hid },
71  { M680X_INS_CLR, dir_hid, inh_hid },
72  // 0x4x, inherent instructions
73  { M680X_INS_NEGA, inh_hid, inh_hid },
74  { M680X_INS_ILLGL, illgl_hid, inh_hid },
75  { M680X_INS_MUL, inh_hid, inh_hid },
76  { M680X_INS_COMA, inh_hid, inh_hid },
77  { M680X_INS_LSRA, inh_hid, inh_hid },
78  { M680X_INS_ILLGL, illgl_hid, inh_hid },
79  { M680X_INS_RORA, inh_hid, inh_hid },
80  { M680X_INS_ASRA, inh_hid, inh_hid },
81  { M680X_INS_LSLA, inh_hid, inh_hid },
82  { M680X_INS_ROLA, inh_hid, inh_hid },
83  { M680X_INS_DECA, inh_hid, inh_hid },
84  { M680X_INS_ILLGL, illgl_hid, inh_hid },
85  { M680X_INS_INCA, inh_hid, inh_hid },
86  { M680X_INS_TSTA, inh_hid, inh_hid },
87  { M680X_INS_ILLGL, illgl_hid, inh_hid },
88  { M680X_INS_CLRA, inh_hid, inh_hid },
89  // 0x5x, inherent instructions
90  { M680X_INS_NEGX, inh_hid, inh_hid },
91  { M680X_INS_ILLGL, illgl_hid, inh_hid },
92  { M680X_INS_ILLGL, illgl_hid, inh_hid },
93  { M680X_INS_COMX, inh_hid, inh_hid },
94  { M680X_INS_LSRX, inh_hid, inh_hid },
95  { M680X_INS_ILLGL, illgl_hid, inh_hid },
96  { M680X_INS_RORX, inh_hid, inh_hid },
97  { M680X_INS_ASRX, inh_hid, inh_hid },
98  { M680X_INS_LSLX, inh_hid, inh_hid },
99  { M680X_INS_ROLX, inh_hid, inh_hid },
100  { M680X_INS_DECX, inh_hid, inh_hid },
101  { M680X_INS_ILLGL, illgl_hid, inh_hid },
102  { M680X_INS_INCX, inh_hid, inh_hid },
103  { M680X_INS_TSTX, inh_hid, inh_hid },
104  { M680X_INS_ILLGL, illgl_hid, inh_hid },
105  { M680X_INS_CLRX, inh_hid, inh_hid },
106  // 0x6x, indexed, 1 byte offset instructions
107  { M680X_INS_NEG, idxX_hid, inh_hid },
108  { M680X_INS_ILLGL, illgl_hid, inh_hid },
109  { M680X_INS_ILLGL, illgl_hid, inh_hid },
110  { M680X_INS_COM, idxX_hid, inh_hid },
111  { M680X_INS_LSR, idxX_hid, inh_hid },
112  { M680X_INS_ILLGL, illgl_hid, inh_hid },
113  { M680X_INS_ROR, idxX_hid, inh_hid },
114  { M680X_INS_ASR, idxX_hid, inh_hid },
115  { M680X_INS_LSL, idxX_hid, inh_hid },
116  { M680X_INS_ROL, idxX_hid, inh_hid },
117  { M680X_INS_DEC, idxX_hid, inh_hid },
118  { M680X_INS_ILLGL, illgl_hid, inh_hid },
119  { M680X_INS_INC, idxX_hid, inh_hid },
120  { M680X_INS_TST, idxX_hid, inh_hid },
121  { M680X_INS_ILLGL, illgl_hid, inh_hid },
122  { M680X_INS_CLR, idxX_hid, inh_hid },
123  // 0x7x, indexed, no offset instructions
124  { M680X_INS_NEG, idxX0_hid, inh_hid },
125  { M680X_INS_ILLGL, illgl_hid, inh_hid },
126  { M680X_INS_ILLGL, illgl_hid, inh_hid },
127  { M680X_INS_COM, idxX0_hid, inh_hid },
128  { M680X_INS_LSR, idxX0_hid, inh_hid },
129  { M680X_INS_ILLGL, illgl_hid, inh_hid },
130  { M680X_INS_ROR, idxX0_hid, inh_hid },
131  { M680X_INS_ASR, idxX0_hid, inh_hid },
132  { M680X_INS_LSL, idxX0_hid, inh_hid },
133  { M680X_INS_ROL, idxX0_hid, inh_hid },
134  { M680X_INS_DEC, idxX0_hid, inh_hid },
135  { M680X_INS_ILLGL, illgl_hid, inh_hid },
136  { M680X_INS_INC, idxX0_hid, inh_hid },
137  { M680X_INS_TST, idxX0_hid, inh_hid },
138  { M680X_INS_ILLGL, illgl_hid, inh_hid },
139  { M680X_INS_CLR, idxX0_hid, inh_hid },
140  // 0x8x, inherent instructions
141  { M680X_INS_RTI, inh_hid, inh_hid },
142  { M680X_INS_RTS, inh_hid, inh_hid },
143  { M680X_INS_ILLGL, illgl_hid, inh_hid },
144  { M680X_INS_SWI, inh_hid, inh_hid },
145  { M680X_INS_ILLGL, illgl_hid, inh_hid },
146  { M680X_INS_ILLGL, illgl_hid, inh_hid },
147  { M680X_INS_ILLGL, illgl_hid, inh_hid },
148  { M680X_INS_ILLGL, illgl_hid, inh_hid },
149  { M680X_INS_ILLGL, illgl_hid, inh_hid },
150  { M680X_INS_ILLGL, illgl_hid, inh_hid },
151  { M680X_INS_ILLGL, illgl_hid, inh_hid },
152  { M680X_INS_ILLGL, illgl_hid, inh_hid },
153  { M680X_INS_ILLGL, illgl_hid, inh_hid },
154  { M680X_INS_ILLGL, illgl_hid, inh_hid },
155  { M680X_INS_STOP, inh_hid, inh_hid },
156  { M680X_INS_WAIT, inh_hid, inh_hid },
157  // 0x9x, inherent instructions
158  { M680X_INS_ILLGL, illgl_hid, inh_hid },
159  { M680X_INS_ILLGL, illgl_hid, inh_hid },
160  { M680X_INS_ILLGL, illgl_hid, inh_hid },
161  { M680X_INS_ILLGL, illgl_hid, inh_hid },
162  { M680X_INS_ILLGL, illgl_hid, inh_hid },
163  { M680X_INS_ILLGL, illgl_hid, inh_hid },
164  { M680X_INS_ILLGL, illgl_hid, inh_hid },
165  { M680X_INS_TAX, inh_hid, inh_hid },
166  { M680X_INS_CLC, inh_hid, inh_hid },
167  { M680X_INS_SEC, inh_hid, inh_hid },
168  { M680X_INS_CLI, inh_hid, inh_hid },
169  { M680X_INS_SEI, inh_hid, inh_hid },
170  { M680X_INS_RSP, inh_hid, inh_hid },
171  { M680X_INS_NOP, inh_hid, inh_hid },
172  { M680X_INS_ILLGL, illgl_hid, inh_hid },
173  { M680X_INS_TXA, inh_hid, inh_hid },
174  // 0xAx, immediate instructions with reg. A
175  { M680X_INS_SUB, imm8_hid, inh_hid },
176  { M680X_INS_CMP, imm8_hid, inh_hid },
177  { M680X_INS_SBC, imm8_hid, inh_hid },
178  { M680X_INS_CPX, imm8_hid, inh_hid },
179  { M680X_INS_AND, imm8_hid, inh_hid },
180  { M680X_INS_BIT, imm8_hid, inh_hid },
181  { M680X_INS_LDA, imm8_hid, inh_hid },
182  { M680X_INS_ILLGL, illgl_hid, inh_hid },
183  { M680X_INS_EOR, imm8_hid, inh_hid },
184  { M680X_INS_ADC, imm8_hid, inh_hid },
185  { M680X_INS_ORA, imm8_hid, inh_hid },
186  { M680X_INS_ADD, imm8_hid, inh_hid },
187  { M680X_INS_ILLGL, illgl_hid, inh_hid },
188  { M680X_INS_BSR, rel8_hid, inh_hid },
189  { M680X_INS_LDX, imm8_hid, inh_hid },
190  { M680X_INS_ILLGL, illgl_hid, inh_hid },
191  // 0xBx, direct instructions with reg. A
192  { M680X_INS_SUB, dir_hid, inh_hid },
193  { M680X_INS_CMP, dir_hid, inh_hid },
194  { M680X_INS_SBC, dir_hid, inh_hid },
195  { M680X_INS_CPX, dir_hid, inh_hid },
196  { M680X_INS_AND, dir_hid, inh_hid },
197  { M680X_INS_BIT, dir_hid, inh_hid },
198  { M680X_INS_LDA, dir_hid, inh_hid },
199  { M680X_INS_STA, dir_hid, inh_hid },
200  { M680X_INS_EOR, dir_hid, inh_hid },
201  { M680X_INS_ADC, dir_hid, inh_hid },
202  { M680X_INS_ORA, dir_hid, inh_hid },
203  { M680X_INS_ADD, dir_hid, inh_hid },
204  { M680X_INS_JMP, dir_hid, inh_hid },
205  { M680X_INS_JSR, dir_hid, inh_hid },
206  { M680X_INS_LDX, dir_hid, inh_hid },
207  { M680X_INS_STX, dir_hid, inh_hid },
208  // 0xCx, extended instructions with reg. A
209  { M680X_INS_SUB, ext_hid, inh_hid },
210  { M680X_INS_CMP, ext_hid, inh_hid },
211  { M680X_INS_SBC, ext_hid, inh_hid },
212  { M680X_INS_CPX, ext_hid, inh_hid },
213  { M680X_INS_AND, ext_hid, inh_hid },
214  { M680X_INS_BIT, ext_hid, inh_hid },
215  { M680X_INS_LDA, ext_hid, inh_hid },
216  { M680X_INS_STA, ext_hid, inh_hid },
217  { M680X_INS_EOR, ext_hid, inh_hid },
218  { M680X_INS_ADC, ext_hid, inh_hid },
219  { M680X_INS_ORA, ext_hid, inh_hid },
220  { M680X_INS_ADD, ext_hid, inh_hid },
221  { M680X_INS_JMP, ext_hid, inh_hid },
222  { M680X_INS_JSR, ext_hid, inh_hid },
223  { M680X_INS_LDX, ext_hid, inh_hid },
224  { M680X_INS_STX, ext_hid, inh_hid },
225  // 0xDx, indexed with 2 byte offset instructions with reg. A
226  { M680X_INS_SUB, idxX16_hid, inh_hid },
227  { M680X_INS_CMP, idxX16_hid, inh_hid },
228  { M680X_INS_SBC, idxX16_hid, inh_hid },
229  { M680X_INS_CPX, idxX16_hid, inh_hid },
230  { M680X_INS_AND, idxX16_hid, inh_hid },
231  { M680X_INS_BIT, idxX16_hid, inh_hid },
232  { M680X_INS_LDA, idxX16_hid, inh_hid },
233  { M680X_INS_STA, idxX16_hid, inh_hid },
234  { M680X_INS_EOR, idxX16_hid, inh_hid },
235  { M680X_INS_ADC, idxX16_hid, inh_hid },
236  { M680X_INS_ORA, idxX16_hid, inh_hid },
237  { M680X_INS_ADD, idxX16_hid, inh_hid },
238  { M680X_INS_JMP, idxX16_hid, inh_hid },
239  { M680X_INS_JSR, idxX16_hid, inh_hid },
240  { M680X_INS_LDX, idxX16_hid, inh_hid },
241  { M680X_INS_STX, idxX16_hid, inh_hid },
242  // 0xEx, indexed with 1 byte offset instructions with reg. A
243  { M680X_INS_SUB, idxX_hid, inh_hid },
244  { M680X_INS_CMP, idxX_hid, inh_hid },
245  { M680X_INS_SBC, idxX_hid, inh_hid },
246  { M680X_INS_CPX, idxX_hid, inh_hid },
247  { M680X_INS_AND, idxX_hid, inh_hid },
248  { M680X_INS_BIT, idxX_hid, inh_hid },
249  { M680X_INS_LDA, idxX_hid, inh_hid },
250  { M680X_INS_STA, idxX_hid, inh_hid },
251  { M680X_INS_EOR, idxX_hid, inh_hid },
252  { M680X_INS_ADC, idxX_hid, inh_hid },
253  { M680X_INS_ORA, idxX_hid, inh_hid },
254  { M680X_INS_ADD, idxX_hid, inh_hid },
255  { M680X_INS_JMP, idxX_hid, inh_hid },
256  { M680X_INS_JSR, idxX_hid, inh_hid },
257  { M680X_INS_LDX, idxX_hid, inh_hid },
258  { M680X_INS_STX, idxX_hid, inh_hid },
259  // 0xFx, indexed without offset instructions with reg. A
260  { M680X_INS_SUB, idxX0_hid, inh_hid },
261  { M680X_INS_CMP, idxX0_hid, inh_hid },
262  { M680X_INS_SBC, idxX0_hid, inh_hid },
263  { M680X_INS_CPX, idxX0_hid, inh_hid },
264  { M680X_INS_AND, idxX0_hid, inh_hid },
265  { M680X_INS_BIT, idxX0_hid, inh_hid },
266  { M680X_INS_LDA, idxX0_hid, inh_hid },
267  { M680X_INS_STA, idxX0_hid, inh_hid },
268  { M680X_INS_EOR, idxX0_hid, inh_hid },
269  { M680X_INS_ADC, idxX0_hid, inh_hid },
270  { M680X_INS_ORA, idxX0_hid, inh_hid },
271  { M680X_INS_ADD, idxX0_hid, inh_hid },
272  { M680X_INS_JMP, idxX0_hid, inh_hid },
273  { M680X_INS_JSR, idxX0_hid, inh_hid },
274  { M680X_INS_LDX, idxX0_hid, inh_hid },
275  { M680X_INS_STX, idxX0_hid, inh_hid },
276 };
277 
@ M680X_INS_BHCS
Definition: m680x.h:218
@ M680X_INS_ADD
Definition: m680x.h:182
@ M680X_INS_TSTX
Definition: m680x.h:518
@ M680X_INS_BMC
Definition: m680x.h:233
@ M680X_INS_BRA
Definition: m680x.h:241
@ M680X_INS_SWI
Definition: m680x.h:495
@ M680X_INS_BIH
Definition: m680x.h:222
@ M680X_INS_DECA
Definition: m680x.h:297
@ M680X_INS_ASR
Definition: m680x.h:203
@ M680X_INS_BRSET
Definition: m680x.h:240
@ M680X_INS_NEGA
Definition: m680x.h:405
@ M680X_INS_CMP
Definition: m680x.h:264
@ M680X_INS_AND
Definition: m680x.h:193
@ M680X_INS_INC
Definition: m680x.h:333
@ M680X_INS_BCS
or BLO
Definition: m680x.h:211
@ M680X_INS_ROLA
Definition: m680x.h:444
@ M680X_INS_COMX
Definition: m680x.h:283
@ M680X_INS_BMS
Definition: m680x.h:235
@ M680X_INS_BHI
Definition: m680x.h:219
@ M680X_INS_BNE
Definition: m680x.h:236
@ M680X_INS_TSTA
Definition: m680x.h:512
@ M680X_INS_BSET
Definition: m680x.h:243
@ M680X_INS_NEG
Definition: m680x.h:404
@ M680X_INS_BIT
Definition: m680x.h:225
@ M680X_INS_LDX
Definition: m680x.h:377
@ M680X_INS_RSP
Definition: m680x.h:455
@ M680X_INS_CLI
M6800/1/2/3.
Definition: m680x.h:253
@ M680X_INS_BLS
Definition: m680x.h:231
@ M680X_INS_ILLGL
Definition: m680x.h:332
@ M680X_INS_LSRA
Definition: m680x.h:389
@ M680X_INS_CLR
Definition: m680x.h:254
@ M680X_INS_SEC
Definition: m680x.h:465
@ M680X_INS_WAIT
Definition: m680x.h:525
@ M680X_INS_BMI
Definition: m680x.h:234
@ M680X_INS_BHCC
Definition: m680x.h:217
@ M680X_INS_BEQ
Definition: m680x.h:213
@ M680X_INS_JMP
Definition: m680x.h:344
@ M680X_INS_COM
Definition: m680x.h:276
@ M680X_INS_INCX
Definition: m680x.h:340
@ M680X_INS_ROR
Definition: m680x.h:449
@ M680X_INS_BRN
Definition: m680x.h:242
@ M680X_INS_BPL
Definition: m680x.h:238
@ M680X_INS_LSR
Definition: m680x.h:388
@ M680X_INS_BRCLR
Definition: m680x.h:239
@ M680X_INS_INCA
Definition: m680x.h:334
@ M680X_INS_TST
Definition: m680x.h:511
@ M680X_INS_SUB
Definition: m680x.h:487
@ M680X_INS_LSLA
Definition: m680x.h:384
@ M680X_INS_LSRX
Definition: m680x.h:393
@ M680X_INS_ROLX
Definition: m680x.h:448
@ M680X_INS_EOR
Definition: m680x.h:320
@ M680X_INS_CLRA
Definition: m680x.h:255
@ M680X_INS_BCLR
Definition: m680x.h:210
@ M680X_INS_CLRX
Definition: m680x.h:262
@ M680X_INS_BIL
Definition: m680x.h:223
@ M680X_INS_RORX
Definition: m680x.h:454
@ M680X_INS_BCC
or BHS
Definition: m680x.h:209
@ M680X_INS_ADC
Definition: m680x.h:177
@ M680X_INS_TAX
Definition: m680x.h:501
@ M680X_INS_TXA
Definition: m680x.h:521
@ M680X_INS_RTS
Definition: m680x.h:458
@ M680X_INS_ROL
Definition: m680x.h:443
@ M680X_INS_RORA
Definition: m680x.h:450
@ M680X_INS_CLC
M6800/1/2/3.
Definition: m680x.h:252
@ M680X_INS_NOP
Definition: m680x.h:409
@ M680X_INS_MUL
Definition: m680x.h:402
@ M680X_INS_DEC
Definition: m680x.h:296
@ M680X_INS_DECX
Definition: m680x.h:303
@ M680X_INS_STA
Definition: m680x.h:471
@ M680X_INS_SBC
Definition: m680x.h:460
@ M680X_INS_LDA
Definition: m680x.h:363
@ M680X_INS_LSLX
Definition: m680x.h:387
@ M680X_INS_COMA
Definition: m680x.h:277
@ M680X_INS_BSR
Definition: m680x.h:244
@ M680X_INS_LSL
Definition: m680x.h:383
@ M680X_INS_ORA
Definition: m680x.h:412
@ M680X_INS_NEGX
Definition: m680x.h:408
@ M680X_INS_STX
Definition: m680x.h:485
@ M680X_INS_CPX
M6800/1/2/3.
Definition: m680x.h:287
@ M680X_INS_RTI
Definition: m680x.h:457
@ M680X_INS_STOP
Definition: m680x.h:479
@ M680X_INS_SEI
Definition: m680x.h:466
@ M680X_INS_ASRX
Definition: m680x.h:207
@ M680X_INS_JSR
Definition: m680x.h:345
@ M680X_INS_ASRA
Definition: m680x.h:204