yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
opcodes.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <string>
5#include <unordered_map>
6
7const std::unordered_map<uint8_t, std::string> spc_opcode_map = {
8 {0x00, "NOP"},
9 {0x01, "TCALL0"},
10 {0x02, "SET1 direct.0"},
11 {0x03, "BBS direct.0,rel"},
12 {0x04, "OR A,direct"},
13 {0x05, "OR A,abs"},
14 {0x06, "OR A,(X)"},
15 {0x07, "OR A,(direct+X)"},
16 {0x08, "OR A,#imm"},
17 {0x09, "OR direct,imm"},
18 {0x0A, "OR1 C,membit"},
19 {0x0B, "ASL direct"},
20 {0x0C, "ASL abs"},
21 {0x0D, "PUSH PSW"},
22 {0x0E, "TSET1 abs"},
23 {0x0F, "BRK"},
24 {0x10, "BPL rel"},
25 {0x11, "TCALL1"},
26 {0x12, "CLR1 direct.0"},
27 {0x13, "BBC direct.0,rel"},
28 {0x14, "OR A,direct+X"},
29 {0x15, "OR A,abs+X"},
30 {0x16, "OR A,abs+Y"},
31 {0x17, "OR A,(direct)+Y"},
32 {0x18, "OR direct,direct"},
33 {0x19, "OR (X),(Y)"},
34 {0x1A, "DECW direct"},
35 {0x1B, "ASL direct+X"},
36 {0x1C, "ASL A"},
37 {0x1D, "DEC X"},
38 {0x1E, "CMP X,abs"},
39 {0x1F, "JMP (abs+X)"},
40 {0x20, "CLRP"},
41 {0x21, "TCALL2"},
42 {0x22, "SET1 direct.1"},
43 {0x23, "BBS direct.1,rel"},
44 {0x24, "AND A,direct"},
45 {0x25, "AND A,abs"},
46 {0x26, "AND A,(X)"},
47 {0x27, "AND A,(direct+X)"},
48 {0x28, "AND A,#imm"},
49 {0x29, "AND direct,imm"},
50 {0x2A, "OR1 C,/membit"},
51 {0x2B, "ROL direct"},
52 {0x2C, "ROL abs"},
53 {0x2D, "PUSH A"},
54 {0x2E, "CBNE direct,rel"},
55 {0x2F, "BRA rel"},
56 {0x30, "BMI rel"},
57 {0x31, "TCALL3"},
58 {0x32, "CLR1 direct.1"},
59 {0x33, "BBC direct.1,rel"},
60 {0x34, "AND A,direct+X"},
61 {0x35, "AND A,abs+X"},
62 {0x36, "AND A,abs+Y"},
63 {0x37, "AND A,(direct)+Y"},
64 {0x38, "AND direct,direct"},
65 {0x39, "AND (X),(Y)"},
66 {0x3A, "INCW direct"},
67 {0x3B, "ROL direct+X"},
68 {0x3C, "ROL A"},
69 {0x3D, "INC X"},
70 {0x3E, "CMP X,direct"},
71 {0x3F, "CALL abs"},
72 {0x40, "SETP"},
73 {0x41, "TCALL4"},
74 {0x42, "SET1 direct.2"},
75 {0x43, "BBS direct.2,rel"},
76 {0x44, "EOR A,direct"},
77 {0x45, "EOR A,abs"},
78 {0x46, "EOR A,(X)"},
79 {0x47, "EOR A,(direct+X)"},
80 {0x48, "EOR A,#imm"},
81 {0x49, "EOR direct,imm"},
82 {0x4A, "AND1 C,membit"},
83 {0x4B, "LSR direct"},
84 {0x4C, "LSR abs"},
85 {0x4D, "PUSH X"},
86 {0x4E, "TCLR1 abs"},
87 {0x4F, "PCALL addr"},
88 {0x50, "BVC rel"},
89 {0x51, "TCALL5"},
90 {0x52, "CLR1 direct.2"},
91 {0x53, "BBC direct.2,rel"},
92 {0x54, "EOR A,direct+X"},
93 {0x55, "EOR A,abs+X"},
94 {0x56, "EOR A,abs+Y"},
95 {0x57, "EOR A,(direct)+Y"},
96 {0x58, "EOR direct,direct"},
97 {0x59, "EOR (X),(Y)"},
98 {0x5A, "CMPW YA,direct"},
99 {0x5B, "LSR direct+X"},
100 {0x5C, "LSR A"},
101 {0x5D, "MOV X,A"},
102 {0x5E, "CMP Y,abs"},
103 {0x5F, "JMP abs"},
104 {0x60, "CLRC"},
105 {0x61, "TCALL6"},
106 {0x62, "SET1 direct.3"},
107 {0x63, "BBS direct.3,rel"},
108 {0x64, "CMP A,direct"},
109 {0x65, "CMP A,abs"},
110 {0x66, "CMP A,(X)"},
111 {0x67, "CMP A,(direct+X)"},
112 {0x68, "CMP A,#imm"},
113 {0x69, "CMP direct,imm"},
114 {0x6A, "AND1 C,/membit"},
115 {0x6B, "ROR direct"},
116 {0x6C, "ROR abs"},
117 {0x6D, "PUSH Y"},
118 {0x6E, "DBNZ direct,rel"},
119 {0x6F, "RET"},
120 {0x70, "BVS rel"},
121 {0x71, "TCALL7"},
122 {0x72, "CLR1 direct.3"},
123 {0x73, "BBC direct.3,rel"},
124 {0x74, "CMP A,direct+X"},
125 {0x75, "CMP A,abs+X"},
126 {0x76, "CMP A,abs+Y"},
127 {0x77, "CMP A,(direct)+Y"},
128 {0x78, "CMP direct,direct"},
129 {0x79, "CMP (X),(Y)"},
130 {0x7A, "ADDW YA,direct"},
131 {0x7B, "ROR direct+X"},
132 {0x7C, "ROR A"},
133 {0x7D, "MOV A,X"},
134 {0x7E, "CMP Y,direct"},
135 {0x7F, "RETI"},
136 {0x80, "SETC"},
137 {0x81, "TCALL8"},
138 {0x82, "SET1 direct.4"},
139 {0x83, "BBS direct.4,rel"},
140 {0x84, "ADC A,direct"},
141 {0x85, "ADC A,abs"},
142 {0x86, "ADC A,(X)"},
143 {0x87, "ADC A,(direct+X)"},
144 {0x88, "ADC A,#imm"},
145 {0x89, "ADC direct,imm"},
146 {0x8A, "EOR1 C,membit"},
147 {0x8B, "DEC direct"},
148 {0x8C, "DEC abs"},
149 {0x8D, "MOV Y,#imm"},
150 {0x8E, "POP PSW"},
151 {0x8F, "MOV direct,#imm"},
152 {0x90, "BCC rel"},
153 {0x91, "TCALL9"},
154 {0x92, "CLR1 direct.4"},
155 {0x93, "BBC direct.4,rel"},
156 {0x94, "ADC A,direct+X"},
157 {0x95, "ADC A,abs+X"},
158 {0x96, "ADC A,abs+Y"},
159 {0x97, "ADC A,(direct)+Y"},
160 {0x98, "ADC direct,direct"},
161 {0x99, "ADC (X),(Y)"},
162 {0x9A, "SUBW YA,direct"},
163 {0x9B, "DEC direct+X"},
164 {0x9C, "DEC A"},
165 {0x9D, "MOV X,SP"},
166 {0x9E, "DIV YA,X"},
167 {0x9F, "XCN A"},
168 {0xA0, "EI"},
169 {0xA1, "TCALL10"},
170 {0xA2, "SET1 direct.5"},
171 {0xA3, "BBS direct.5,rel"},
172 {0xA4, "SBC A,direct"},
173 {0xA5, "SBC A,abs"},
174 {0xA6, "SBC A,(X)"},
175 {0xA7, "SBC A,(direct+X)"},
176 {0xA8, "SBC A,#imm"},
177 {0xA9, "SBC direct,imm"},
178 {0xAA, "MOV1 C,membit"},
179 {0xAB, "INC direct"},
180 {0xAC, "INC abs"},
181 {0xAD, "CMP Y,#imm"},
182 {0xAE, "POP A"},
183 {0xAF, "MOV (X)+,A"},
184 {0xB0, "BCS rel"},
185 {0xB1, "TCALL11"},
186 {0xB2, "CLR1 direct.5"},
187 {0xB3, "BBC direct.5,rel"},
188 {0xB4, "SBC A,direct+X"},
189 {0xB5, "SBC A,abs+X"},
190 {0xB6, "SBC A,abs+Y"},
191 {0xB7, "SBC A,(direct)+Y"},
192 {0xB8, "SBC direct,direct"},
193 {0xB9, "SBC (X),(Y)"},
194 {0xBA, "MOVW YA,direct"},
195 {0xBB, "INC direct+X"},
196 {0xBC, "INC A"},
197 {0xBD, "MOV SP,X"},
198 {0xBE, "DAS"},
199 {0xBF, "MOV A,(X)+"},
200 {0xC0, "DI"},
201 {0xC1, "TCALL12"},
202 {0xC2, "SET1 direct.6"},
203 {0xC3, "BBS direct.6,rel"},
204 {0xC4, "MOV direct,A"},
205 {0xC5, "MOV abs,A"},
206 {0xC6, "MOV (X),A"},
207 {0xC7, "MOV (direct+X),A"},
208 {0xC8, "CMP X,#imm"},
209 {0xC9, "MOV abs,X"},
210 {0xCA, "MOV1 membit,C"},
211 {0xCB, "MOV direct,Y"},
212 {0xCC, "MOV abs,Y"},
213 {0xCD, "MOV X,#imm"},
214 {0xCE, "POP X"},
215 {0xCF, "MUL YA"},
216 {0xD0, "BNE rel"},
217 {0xD1, "TCALL13"},
218 {0xD2, "CLR1 direct.6"},
219 {0xD3, "BBC direct.6,rel"},
220 {0xD4, "MOV direct+X,A"},
221 {0xD5, "MOV abs+X,A"},
222 {0xD6, "MOV abs+Y,A"},
223 {0xD7, "MOV (direct)+Y,A"},
224 {0xD8, "MOV direct,X"},
225 {0xD9, "MOV direct+Y,X"},
226 {0xDA, "MOVW direct,YA"},
227 {0xDB, "MOV direct+X,Y"},
228 {0xDC, "DEC Y"},
229 {0xDD, "MOV A,Y"},
230 {0xDE, "CBNE direct+X,rel"},
231 {0xDF, "DAA"},
232 {0xE0, "CLRV"},
233 {0xE1, "TCALL14"},
234 {0xE2, "SET1 direct.7"},
235 {0xE3, "BBS direct.7,rel"},
236 {0xE4, "MOV A,direct"},
237 {0xE5, "MOV A,abs"},
238 {0xE6, "MOV A,(X)"},
239 {0xE7, "MOV A,(direct+X)"},
240 {0xE8, "MOV A,#imm"},
241 {0xE9, "MOV X,abs"},
242 {0xEA, "NOT1 membit"},
243 {0xEB, "MOV Y,direct"},
244 {0xEC, "MOV Y,abs"},
245 {0xED, "NOTC"},
246 {0xEE, "POP Y"},
247 {0xEF, "SLEEP"},
248 {0xF0, "BEQ rel"},
249 {0xF1, "TCALL15"},
250 {0xF2, "CLR1 direct.7"},
251 {0xF3, "BBC direct.7,rel"},
252 {0xF4, "MOV A,direct+X"},
253 {0xF5, "MOV A,abs+X"},
254 {0xF6, "MOV A,abs+Y"},
255 {0xF7, "MOV A,(direct)+Y"},
256 {0xF8, "MOV X,direct"},
257 {0xF9, "MOV X,direct+Y"},
258 {0xFA, "MOV direct,S"},
259 {0xFB, "MOV Y,direct+X"},
260 {0xFC, "INC Y"},
261 {0xFD, "MOV Y,A"},
262 {0xFE, "DBNZ Y,rel"},
263 {0xFF, "STOP"}};
const std::unordered_map< uint8_t, std::string > spc_opcode_map
Definition opcodes.h:7