]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC05_table.ma
(no commit message)
[helm.git] / helm / software / matita / contribs / ng_assembly / emulator / opcodes / HC05_table.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* ********************************************************************** *)
16 (*                          Progetto FreeScale                            *)
17 (*                                                                        *)
18 (*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
19 (*   Sviluppo: 2008-2010                                                  *)
20 (*                                                                        *)
21 (* ********************************************************************** *)
22
23 include "emulator/opcodes/HC05_opcode.ma".
24 include "emulator/opcodes/HC05_instr_mode.ma".
25 include "emulator/opcodes/byte_or_word.ma".
26 include "common/list.ma".
27
28 (* ***************** *)
29 (* TABELLA DELL'HC05 *)
30 (* ***************** *)
31
32 (* definizione come concatenazione finale di liste per velocizzare il parsing *)
33 (* ogni riga e' (any_opcode m) (instr_mode) (opcode esadecimale) (#cicli esecuzione) *)
34 (* NB: l'uso di any_opcode m + concatenazione finale tutte liste
35        impedisce di introdurre opcode disomogenei (per mcu) *)
36
37 ndefinition opcode_table_HC05_1 ≝
38 [
39   quadruple … ADC MODE_IMM1 (Byte 〈xA,x9〉) 〈x0,x2〉
40 ; quadruple … ADC MODE_DIR1 (Byte 〈xB,x9〉) 〈x0,x3〉
41 ; quadruple … ADC MODE_DIR2 (Byte 〈xC,x9〉) 〈x0,x4〉
42 ; quadruple … ADC MODE_IX2  (Byte 〈xD,x9〉) 〈x0,x5〉
43 ; quadruple … ADC MODE_IX1  (Byte 〈xE,x9〉) 〈x0,x4〉
44 ; quadruple … ADC MODE_IX0  (Byte 〈xF,x9〉) 〈x0,x4〉
45 ].
46
47 ndefinition opcode_table_HC05_2 ≝
48 [
49   quadruple … ADD MODE_IMM1 (Byte 〈xA,xB〉) 〈x0,x2〉
50 ; quadruple … ADD MODE_DIR1 (Byte 〈xB,xB〉) 〈x0,x3〉
51 ; quadruple … ADD MODE_DIR2 (Byte 〈xC,xB〉) 〈x0,x4〉
52 ; quadruple … ADD MODE_IX2  (Byte 〈xD,xB〉) 〈x0,x5〉
53 ; quadruple … ADD MODE_IX1  (Byte 〈xE,xB〉) 〈x0,x4〉
54 ; quadruple … ADD MODE_IX0  (Byte 〈xF,xB〉) 〈x0,x3〉
55 ].
56
57 ndefinition opcode_table_HC05_3 ≝
58 [
59   quadruple … AND MODE_IMM1 (Byte 〈xA,x4〉) 〈x0,x2〉
60 ; quadruple … AND MODE_DIR1 (Byte 〈xB,x4〉) 〈x0,x3〉
61 ; quadruple … AND MODE_DIR2 (Byte 〈xC,x4〉) 〈x0,x4〉
62 ; quadruple … AND MODE_IX2  (Byte 〈xD,x4〉) 〈x0,x5〉
63 ; quadruple … AND MODE_IX1  (Byte 〈xE,x4〉) 〈x0,x4〉
64 ; quadruple … AND MODE_IX0  (Byte 〈xF,x4〉) 〈x0,x3〉
65 ].
66
67 ndefinition opcode_table_HC05_4 ≝
68 [
69   quadruple … ASL MODE_DIR1 (Byte 〈x3,x8〉) 〈x0,x5〉
70 ; quadruple … ASL MODE_INHA (Byte 〈x4,x8〉) 〈x0,x3〉
71 ; quadruple … ASL MODE_INHX (Byte 〈x5,x8〉) 〈x0,x3〉
72 ; quadruple … ASL MODE_IX1  (Byte 〈x6,x8〉) 〈x0,x6〉
73 ; quadruple … ASL MODE_IX0  (Byte 〈x7,x8〉) 〈x0,x5〉
74 ].
75
76 ndefinition opcode_table_HC05_5 ≝
77 [
78   quadruple … ASR MODE_DIR1 (Byte 〈x3,x7〉) 〈x0,x5〉
79 ; quadruple … ASR MODE_INHA (Byte 〈x4,x7〉) 〈x0,x3〉
80 ; quadruple … ASR MODE_INHX (Byte 〈x5,x7〉) 〈x0,x3〉
81 ; quadruple … ASR MODE_IX1  (Byte 〈x6,x7〉) 〈x0,x6〉
82 ; quadruple … ASR MODE_IX0  (Byte 〈x7,x7〉) 〈x0,x5〉
83 ].
84
85 ndefinition opcode_table_HC05_6 ≝
86 [
87   quadruple … BRA  MODE_IMM1 (Byte 〈x2,x0〉) 〈x0,x3〉
88 ; quadruple … BRN  MODE_IMM1 (Byte 〈x2,x1〉) 〈x0,x3〉
89 ; quadruple … BHI  MODE_IMM1 (Byte 〈x2,x2〉) 〈x0,x3〉
90 ; quadruple … BLS  MODE_IMM1 (Byte 〈x2,x3〉) 〈x0,x3〉
91 ; quadruple … BCC  MODE_IMM1 (Byte 〈x2,x4〉) 〈x0,x3〉
92 ; quadruple … BCS  MODE_IMM1 (Byte 〈x2,x5〉) 〈x0,x3〉
93 ; quadruple … BNE  MODE_IMM1 (Byte 〈x2,x6〉) 〈x0,x3〉
94 ; quadruple … BEQ  MODE_IMM1 (Byte 〈x2,x7〉) 〈x0,x3〉
95 ; quadruple … BHCC MODE_IMM1 (Byte 〈x2,x8〉) 〈x0,x3〉
96 ; quadruple … BHCS MODE_IMM1 (Byte 〈x2,x9〉) 〈x0,x3〉
97 ; quadruple … BPL  MODE_IMM1 (Byte 〈x2,xA〉) 〈x0,x3〉
98 ; quadruple … BMI  MODE_IMM1 (Byte 〈x2,xB〉) 〈x0,x3〉
99 ; quadruple … BMC  MODE_IMM1 (Byte 〈x2,xC〉) 〈x0,x3〉
100 ; quadruple … BMS  MODE_IMM1 (Byte 〈x2,xD〉) 〈x0,x3〉
101 ; quadruple … BIL  MODE_IMM1 (Byte 〈x2,xE〉) 〈x0,x3〉
102 ; quadruple … BIH  MODE_IMM1 (Byte 〈x2,xF〉) 〈x0,x3〉
103 ].
104
105 ndefinition opcode_table_HC05_7 ≝
106 [
107   quadruple … BSETn (MODE_DIRn o0) (Byte 〈x1,x0〉) 〈x0,x5〉
108 ; quadruple … BCLRn (MODE_DIRn o0) (Byte 〈x1,x1〉) 〈x0,x5〉
109 ; quadruple … BSETn (MODE_DIRn o1) (Byte 〈x1,x2〉) 〈x0,x5〉
110 ; quadruple … BCLRn (MODE_DIRn o1) (Byte 〈x1,x3〉) 〈x0,x5〉
111 ; quadruple … BSETn (MODE_DIRn o2) (Byte 〈x1,x4〉) 〈x0,x5〉
112 ; quadruple … BCLRn (MODE_DIRn o2) (Byte 〈x1,x5〉) 〈x0,x5〉
113 ; quadruple … BSETn (MODE_DIRn o3) (Byte 〈x1,x6〉) 〈x0,x5〉
114 ; quadruple … BCLRn (MODE_DIRn o3) (Byte 〈x1,x7〉) 〈x0,x5〉
115 ; quadruple … BSETn (MODE_DIRn o4) (Byte 〈x1,x8〉) 〈x0,x5〉
116 ; quadruple … BCLRn (MODE_DIRn o4) (Byte 〈x1,x9〉) 〈x0,x5〉
117 ; quadruple … BSETn (MODE_DIRn o5) (Byte 〈x1,xA〉) 〈x0,x5〉
118 ; quadruple … BCLRn (MODE_DIRn o5) (Byte 〈x1,xB〉) 〈x0,x5〉
119 ; quadruple … BSETn (MODE_DIRn o6) (Byte 〈x1,xC〉) 〈x0,x5〉
120 ; quadruple … BCLRn (MODE_DIRn o6) (Byte 〈x1,xD〉) 〈x0,x5〉
121 ; quadruple … BSETn (MODE_DIRn o7) (Byte 〈x1,xE〉) 〈x0,x5〉
122 ; quadruple … BCLRn (MODE_DIRn o7) (Byte 〈x1,xF〉) 〈x0,x5〉
123 ].
124
125 ndefinition opcode_table_HC05_8 ≝
126 [
127   quadruple … BRSETn (MODE_DIRn_and_IMM1 o0) (Byte 〈x0,x0〉) 〈x0,x5〉
128 ; quadruple … BRCLRn (MODE_DIRn_and_IMM1 o0) (Byte 〈x0,x1〉) 〈x0,x5〉
129 ; quadruple … BRSETn (MODE_DIRn_and_IMM1 o1) (Byte 〈x0,x2〉) 〈x0,x5〉
130 ; quadruple … BRCLRn (MODE_DIRn_and_IMM1 o1) (Byte 〈x0,x3〉) 〈x0,x5〉
131 ; quadruple … BRSETn (MODE_DIRn_and_IMM1 o2) (Byte 〈x0,x4〉) 〈x0,x5〉
132 ; quadruple … BRCLRn (MODE_DIRn_and_IMM1 o2) (Byte 〈x0,x5〉) 〈x0,x5〉
133 ; quadruple … BRSETn (MODE_DIRn_and_IMM1 o3) (Byte 〈x0,x6〉) 〈x0,x5〉
134 ; quadruple … BRCLRn (MODE_DIRn_and_IMM1 o3) (Byte 〈x0,x7〉) 〈x0,x5〉
135 ; quadruple … BRSETn (MODE_DIRn_and_IMM1 o4) (Byte 〈x0,x8〉) 〈x0,x5〉
136 ; quadruple … BRCLRn (MODE_DIRn_and_IMM1 o4) (Byte 〈x0,x9〉) 〈x0,x5〉
137 ; quadruple … BRSETn (MODE_DIRn_and_IMM1 o5) (Byte 〈x0,xA〉) 〈x0,x5〉
138 ; quadruple … BRCLRn (MODE_DIRn_and_IMM1 o5) (Byte 〈x0,xB〉) 〈x0,x5〉
139 ; quadruple … BRSETn (MODE_DIRn_and_IMM1 o6) (Byte 〈x0,xC〉) 〈x0,x5〉
140 ; quadruple … BRCLRn (MODE_DIRn_and_IMM1 o6) (Byte 〈x0,xD〉) 〈x0,x5〉
141 ; quadruple … BRSETn (MODE_DIRn_and_IMM1 o7) (Byte 〈x0,xE〉) 〈x0,x5〉
142 ; quadruple … BRCLRn (MODE_DIRn_and_IMM1 o7) (Byte 〈x0,xF〉) 〈x0,x5〉
143 ].
144
145 ndefinition opcode_table_HC05_9 ≝
146 [
147   quadruple … BIT MODE_IMM1 (Byte 〈xA,x5〉) 〈x0,x2〉
148 ; quadruple … BIT MODE_DIR1 (Byte 〈xB,x5〉) 〈x0,x3〉
149 ; quadruple … BIT MODE_DIR2 (Byte 〈xC,x5〉) 〈x0,x4〉
150 ; quadruple … BIT MODE_IX2  (Byte 〈xD,x5〉) 〈x0,x5〉
151 ; quadruple … BIT MODE_IX1  (Byte 〈xE,x5〉) 〈x0,x4〉
152 ; quadruple … BIT MODE_IX0  (Byte 〈xF,x5〉) 〈x0,x3〉
153 ].
154
155 ndefinition opcode_table_HC05_10 ≝
156 [
157   quadruple … MUL  MODE_INH (Byte 〈x4,x2〉) 〈x0,xB〉
158 ; quadruple … RTI  MODE_INH (Byte 〈x8,x0〉) 〈x0,x9〉
159 ; quadruple … RTS  MODE_INH (Byte 〈x8,x1〉) 〈x0,x6〉
160 ; quadruple … SWI  MODE_INH (Byte 〈x8,x3〉) 〈x0,xA〉
161 ; quadruple … STOP MODE_INH (Byte 〈x8,xE〉) 〈x0,x2〉
162 ; quadruple … WAIT MODE_INH (Byte 〈x8,xF〉) 〈x0,x2〉
163 ; quadruple … TAX  MODE_INH (Byte 〈x9,x7〉) 〈x0,x2〉
164 ; quadruple … CLC  MODE_INH (Byte 〈x9,x8〉) 〈x0,x2〉
165 ; quadruple … SEC  MODE_INH (Byte 〈x9,x9〉) 〈x0,x2〉
166 ; quadruple … CLI  MODE_INH (Byte 〈x9,xA〉) 〈x0,x2〉
167 ; quadruple … SEI  MODE_INH (Byte 〈x9,xB〉) 〈x0,x2〉
168 ; quadruple … RSP  MODE_INH (Byte 〈x9,xC〉) 〈x0,x2〉
169 ; quadruple … NOP  MODE_INH (Byte 〈x9,xD〉) 〈x0,x2〉
170 ; quadruple … TXA  MODE_INH (Byte 〈x9,xF〉) 〈x0,x2〉
171 ].
172
173 ndefinition opcode_table_HC05_11 ≝
174 [
175   quadruple … CLR MODE_DIR1 (Byte 〈x3,xF〉) 〈x0,x5〉
176 ; quadruple … CLR MODE_INHA (Byte 〈x4,xF〉) 〈x0,x3〉
177 ; quadruple … CLR MODE_INHX (Byte 〈x5,xF〉) 〈x0,x3〉
178 ; quadruple … CLR MODE_IX1  (Byte 〈x6,xF〉) 〈x0,x6〉
179 ; quadruple … CLR MODE_IX0  (Byte 〈x7,xF〉) 〈x0,x5〉
180 ].
181
182 ndefinition opcode_table_HC05_12 ≝
183 [
184   quadruple … CMP MODE_IMM1 (Byte 〈xA,x1〉) 〈x0,x2〉
185 ; quadruple … CMP MODE_DIR1 (Byte 〈xB,x1〉) 〈x0,x3〉
186 ; quadruple … CMP MODE_DIR2 (Byte 〈xC,x1〉) 〈x0,x4〉
187 ; quadruple … CMP MODE_IX2  (Byte 〈xD,x1〉) 〈x0,x5〉
188 ; quadruple … CMP MODE_IX1  (Byte 〈xE,x1〉) 〈x0,x4〉
189 ; quadruple … CMP MODE_IX0  (Byte 〈xF,x1〉) 〈x0,x3〉
190 ].
191
192 ndefinition opcode_table_HC05_13 ≝
193 [
194   quadruple … COM MODE_DIR1 (Byte 〈x3,x3〉) 〈x0,x5〉
195 ; quadruple … COM MODE_INHA (Byte 〈x4,x3〉) 〈x0,x3〉
196 ; quadruple … COM MODE_INHX (Byte 〈x5,x3〉) 〈x0,x3〉
197 ; quadruple … COM MODE_IX1  (Byte 〈x6,x3〉) 〈x0,x6〉
198 ; quadruple … COM MODE_IX0  (Byte 〈x7,x3〉) 〈x0,x5〉
199 ].
200
201 ndefinition opcode_table_HC05_14 ≝
202 [
203   quadruple … CPX MODE_IMM1 (Byte 〈xA,x3〉) 〈x0,x2〉
204 ; quadruple … CPX MODE_DIR1 (Byte 〈xB,x3〉) 〈x0,x3〉
205 ; quadruple … CPX MODE_DIR2 (Byte 〈xC,x3〉) 〈x0,x4〉
206 ; quadruple … CPX MODE_IX2  (Byte 〈xD,x3〉) 〈x0,x5〉
207 ; quadruple … CPX MODE_IX1  (Byte 〈xE,x3〉) 〈x0,x4〉
208 ; quadruple … CPX MODE_IX0  (Byte 〈xF,x3〉) 〈x0,x3〉
209 ].
210
211 ndefinition opcode_table_HC05_15 ≝
212 [
213   quadruple … DEC MODE_DIR1 (Byte 〈x3,xA〉) 〈x0,x5〉
214 ; quadruple … DEC MODE_INHA (Byte 〈x4,xA〉) 〈x0,x3〉
215 ; quadruple … DEC MODE_INHX (Byte 〈x5,xA〉) 〈x0,x3〉
216 ; quadruple … DEC MODE_IX1  (Byte 〈x6,xA〉) 〈x0,x6〉
217 ; quadruple … DEC MODE_IX0  (Byte 〈x7,xA〉) 〈x0,x5〉
218 ].
219
220 ndefinition opcode_table_HC05_16 ≝
221 [
222   quadruple … EOR MODE_IMM1 (Byte 〈xA,x8〉) 〈x0,x2〉
223 ; quadruple … EOR MODE_DIR1 (Byte 〈xB,x8〉) 〈x0,x3〉
224 ; quadruple … EOR MODE_DIR2 (Byte 〈xC,x8〉) 〈x0,x4〉
225 ; quadruple … EOR MODE_IX2  (Byte 〈xD,x8〉) 〈x0,x5〉
226 ; quadruple … EOR MODE_IX1  (Byte 〈xE,x8〉) 〈x0,x4〉
227 ; quadruple … EOR MODE_IX0  (Byte 〈xF,x8〉) 〈x0,x3〉
228 ].
229
230 ndefinition opcode_table_HC05_17 ≝
231 [
232   quadruple … INC MODE_DIR1 (Byte 〈x3,xC〉) 〈x0,x5〉
233 ; quadruple … INC MODE_INHA (Byte 〈x4,xC〉) 〈x0,x3〉
234 ; quadruple … INC MODE_INHX (Byte 〈x5,xC〉) 〈x0,x3〉
235 ; quadruple … INC MODE_IX1  (Byte 〈x6,xC〉) 〈x0,x6〉
236 ; quadruple … INC MODE_IX0  (Byte 〈x7,xC〉) 〈x0,x5〉
237 ].
238
239 ndefinition opcode_table_HC05_18 ≝
240 [
241   quadruple … JMP MODE_IMM1EXT  (Byte 〈xB,xC〉) 〈x0,x2〉
242 ; quadruple … JMP MODE_IMM2     (Byte 〈xC,xC〉) 〈x0,x3〉
243 ; quadruple … JMP MODE_INHX2ADD (Byte 〈xD,xC〉) 〈x0,x4〉
244 ; quadruple … JMP MODE_INHX1ADD (Byte 〈xE,xC〉) 〈x0,x3〉
245 ; quadruple … JMP MODE_INHX0ADD (Byte 〈xF,xC〉) 〈x0,x2〉
246 ].
247
248 ndefinition opcode_table_HC05_19 ≝
249 [
250   quadruple … BSR MODE_IMM1     (Byte 〈xA,xD〉) 〈x0,x6〉
251 ; quadruple … JSR MODE_IMM1EXT  (Byte 〈xB,xD〉) 〈x0,x5〉
252 ; quadruple … JSR MODE_IMM2     (Byte 〈xC,xD〉) 〈x0,x6〉
253 ; quadruple … JSR MODE_INHX2ADD (Byte 〈xD,xD〉) 〈x0,x7〉
254 ; quadruple … JSR MODE_INHX1ADD (Byte 〈xE,xD〉) 〈x0,x6〉
255 ; quadruple … JSR MODE_INHX0ADD (Byte 〈xF,xD〉) 〈x0,x5〉
256 ].
257
258 ndefinition opcode_table_HC05_20 ≝
259 [
260   quadruple … LDA MODE_IMM1 (Byte 〈xA,x6〉) 〈x0,x2〉
261 ; quadruple … LDA MODE_DIR1 (Byte 〈xB,x6〉) 〈x0,x3〉
262 ; quadruple … LDA MODE_DIR2 (Byte 〈xC,x6〉) 〈x0,x4〉
263 ; quadruple … LDA MODE_IX2  (Byte 〈xD,x6〉) 〈x0,x5〉
264 ; quadruple … LDA MODE_IX1  (Byte 〈xE,x6〉) 〈x0,x4〉
265 ; quadruple … LDA MODE_IX0  (Byte 〈xF,x6〉) 〈x0,x3〉
266 ].
267
268 ndefinition opcode_table_HC05_21 ≝
269 [
270   quadruple … LDX MODE_IMM1 (Byte 〈xA,xE〉) 〈x0,x2〉
271 ; quadruple … LDX MODE_DIR1 (Byte 〈xB,xE〉) 〈x0,x3〉
272 ; quadruple … LDX MODE_DIR2 (Byte 〈xC,xE〉) 〈x0,x4〉
273 ; quadruple … LDX MODE_IX2  (Byte 〈xD,xE〉) 〈x0,x5〉
274 ; quadruple … LDX MODE_IX1  (Byte 〈xE,xE〉) 〈x0,x4〉
275 ; quadruple … LDX MODE_IX0  (Byte 〈xF,xE〉) 〈x0,x3〉
276 ].
277
278 ndefinition opcode_table_HC05_22 ≝
279 [
280   quadruple … LSR MODE_DIR1 (Byte 〈x3,x4〉) 〈x0,x5〉
281 ; quadruple … LSR MODE_INHA (Byte 〈x4,x4〉) 〈x0,x3〉
282 ; quadruple … LSR MODE_INHX (Byte 〈x5,x4〉) 〈x0,x3〉
283 ; quadruple … LSR MODE_IX1  (Byte 〈x6,x4〉) 〈x0,x6〉
284 ; quadruple … LSR MODE_IX0  (Byte 〈x7,x4〉) 〈x0,x5〉
285 ].
286
287 ndefinition opcode_table_HC05_23 ≝
288 [
289   quadruple … NEG MODE_DIR1 (Byte 〈x3,x0〉) 〈x0,x5〉
290 ; quadruple … NEG MODE_INHA (Byte 〈x4,x0〉) 〈x0,x3〉
291 ; quadruple … NEG MODE_INHX (Byte 〈x5,x0〉) 〈x0,x3〉
292 ; quadruple … NEG MODE_IX1  (Byte 〈x6,x0〉) 〈x0,x6〉
293 ; quadruple … NEG MODE_IX0  (Byte 〈x7,x0〉) 〈x0,x5〉
294 ].
295
296 ndefinition opcode_table_HC05_24 ≝
297 [
298   quadruple … ORA MODE_IMM1 (Byte 〈xA,xA〉) 〈x0,x2〉
299 ; quadruple … ORA MODE_DIR1 (Byte 〈xB,xA〉) 〈x0,x3〉
300 ; quadruple … ORA MODE_DIR2 (Byte 〈xC,xA〉) 〈x0,x4〉
301 ; quadruple … ORA MODE_IX2  (Byte 〈xD,xA〉) 〈x0,x5〉
302 ; quadruple … ORA MODE_IX1  (Byte 〈xE,xA〉) 〈x0,x4〉
303 ; quadruple … ORA MODE_IX0  (Byte 〈xF,xA〉) 〈x0,x3〉
304 ].
305
306 ndefinition opcode_table_HC05_25 ≝
307 [
308   quadruple … ROL MODE_DIR1 (Byte 〈x3,x9〉) 〈x0,x5〉
309 ; quadruple … ROL MODE_INHA (Byte 〈x4,x9〉) 〈x0,x3〉
310 ; quadruple … ROL MODE_INHX (Byte 〈x5,x9〉) 〈x0,x3〉
311 ; quadruple … ROL MODE_IX1  (Byte 〈x6,x9〉) 〈x0,x6〉
312 ; quadruple … ROL MODE_IX0  (Byte 〈x7,x9〉) 〈x0,x5〉
313 ].
314
315 ndefinition opcode_table_HC05_26 ≝
316 [
317   quadruple … ROR MODE_DIR1 (Byte 〈x3,x6〉) 〈x0,x5〉
318 ; quadruple … ROR MODE_INHA (Byte 〈x4,x6〉) 〈x0,x3〉
319 ; quadruple … ROR MODE_INHX (Byte 〈x5,x6〉) 〈x0,x3〉
320 ; quadruple … ROR MODE_IX1  (Byte 〈x6,x6〉) 〈x0,x6〉
321 ; quadruple … ROR MODE_IX0  (Byte 〈x7,x6〉) 〈x0,x5〉
322 ].
323
324 ndefinition opcode_table_HC05_27 ≝
325 [
326   quadruple … SBC MODE_IMM1 (Byte 〈xA,x2〉) 〈x0,x2〉
327 ; quadruple … SBC MODE_DIR1 (Byte 〈xB,x2〉) 〈x0,x3〉
328 ; quadruple … SBC MODE_DIR2 (Byte 〈xC,x2〉) 〈x0,x4〉
329 ; quadruple … SBC MODE_IX2  (Byte 〈xD,x2〉) 〈x0,x5〉
330 ; quadruple … SBC MODE_IX1  (Byte 〈xE,x2〉) 〈x0,x4〉
331 ; quadruple … SBC MODE_IX0  (Byte 〈xF,x2〉) 〈x0,x3〉
332 ].
333
334 ndefinition opcode_table_HC05_28 ≝
335 [
336   quadruple … STA MODE_DIR1 (Byte 〈xB,x7〉) 〈x0,x4〉
337 ; quadruple … STA MODE_DIR2 (Byte 〈xC,x7〉) 〈x0,x5〉
338 ; quadruple … STA MODE_IX2  (Byte 〈xD,x7〉) 〈x0,x6〉
339 ; quadruple … STA MODE_IX1  (Byte 〈xE,x7〉) 〈x0,x5〉
340 ; quadruple … STA MODE_IX0  (Byte 〈xF,x7〉) 〈x0,x4〉
341 ].
342
343 ndefinition opcode_table_HC05_29 ≝
344 [
345   quadruple … STX MODE_DIR1 (Byte 〈xB,xF〉) 〈x0,x4〉
346 ; quadruple … STX MODE_DIR2 (Byte 〈xC,xF〉) 〈x0,x5〉
347 ; quadruple … STX MODE_IX2  (Byte 〈xD,xF〉) 〈x0,x6〉
348 ; quadruple … STX MODE_IX1  (Byte 〈xE,xF〉) 〈x0,x5〉
349 ; quadruple … STX MODE_IX0  (Byte 〈xF,xF〉) 〈x0,x4〉
350 ].
351
352 ndefinition opcode_table_HC05_30 ≝
353 [
354   quadruple … SUB MODE_IMM1 (Byte 〈xA,x0〉) 〈x0,x2〉
355 ; quadruple … SUB MODE_DIR1 (Byte 〈xB,x0〉) 〈x0,x3〉
356 ; quadruple … SUB MODE_DIR2 (Byte 〈xC,x0〉) 〈x0,x4〉
357 ; quadruple … SUB MODE_IX2  (Byte 〈xD,x0〉) 〈x0,x5〉
358 ; quadruple … SUB MODE_IX1  (Byte 〈xE,x0〉) 〈x0,x4〉
359 ; quadruple … SUB MODE_IX0  (Byte 〈xF,x0〉) 〈x0,x3〉
360 ].
361
362 ndefinition opcode_table_HC05_31 ≝
363 [
364   quadruple … TST MODE_DIR1 (Byte 〈x3,xD〉) 〈x0,x4〉
365 ; quadruple … TST MODE_INHA (Byte 〈x4,xD〉) 〈x0,x3〉
366 ; quadruple … TST MODE_INHX (Byte 〈x5,xD〉) 〈x0,x3〉
367 ; quadruple … TST MODE_IX1  (Byte 〈x6,xD〉) 〈x0,x5〉
368 ; quadruple … TST MODE_IX0  (Byte 〈x7,xD〉) 〈x0,x4〉
369 ].
370
371 ndefinition opcode_table_HC05 ≝
372  opcode_table_HC05_1  @ opcode_table_HC05_2  @ opcode_table_HC05_3  @ opcode_table_HC05_4  @
373  opcode_table_HC05_5  @ opcode_table_HC05_6  @ opcode_table_HC05_7  @ opcode_table_HC05_8  @
374  opcode_table_HC05_9  @ opcode_table_HC05_10 @ opcode_table_HC05_11 @ opcode_table_HC05_12 @
375  opcode_table_HC05_13 @ opcode_table_HC05_14 @ opcode_table_HC05_15 @ opcode_table_HC05_16 @
376  opcode_table_HC05_17 @ opcode_table_HC05_18 @ opcode_table_HC05_19 @ opcode_table_HC05_20 @
377  opcode_table_HC05_21 @ opcode_table_HC05_22 @ opcode_table_HC05_23 @ opcode_table_HC05_24 @
378  opcode_table_HC05_25 @ opcode_table_HC05_26 @ opcode_table_HC05_27 @ opcode_table_HC05_28 @
379  opcode_table_HC05_29 @ opcode_table_HC05_30 @ opcode_table_HC05_31.