-
Notifications
You must be signed in to change notification settings - Fork 1
/
6502.tsv
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 7 columns, instead of 6 in line 5.
257 lines (257 loc) · 8.95 KB
/
6502.tsv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
code name memory valid pchfix mode code
00 BRK - T F IMPLIED PUSH16(PC + 1), P((P & 0xcf) | 0x30), PUSH(P), I(1), VEC(0xfffe)
01 ORA R T F PRE_INDIRECT_X T(A | T), N, Z, A
02 STP - F F IMPLIED NOTIMPL
03 SLO RMW F F PRE_INDIRECT_X T(R), C(T & 0x80), W, T(T << 1), W, T(A | T), N, Z, A
04 NOP R F F ZERO_PAGE
05 ORA R T F ZERO_PAGE @01
06 ASL RMW T F ZERO_PAGE T(R), C(T & 0x80), W, T(T << 1), N, Z, W
07 SLO RMW F F ZERO_PAGE @03
08 PHP - T F IMPLIED PUSH((P & 0xcf) | 0x30)
09 ORA - T F IMMEDIATE @01
0A ASL - T F ACCUMULATOR T(A << 1), C(A & 0x80), N, Z, A
0B ANC - F F IMMEDIATE T(A & T), N, Z, A, C(N)
0C NOP R F F ABSOLUTE
0D ORA R T F ABSOLUTE @01
0E ASL RMW T F ABSOLUTE @06
0F SLO RMW F F ABSOLUTE @03
10 BPL W T F RELATIVE B(!N)
11 ORA R T T POST_INDIRECT_Y @01
12 STP - F F IMPLIED @02
13 SLO RMW F T POST_INDIRECT_Y @03
14 NOP R F F ZERO_PAGE_X
15 ORA R T F ZERO_PAGE_X @01
16 ASL RMW T F ZERO_PAGE_X @06
17 SLO RMW F F ZERO_PAGE_X @03
18 CLC - T F IMPLIED C(0)
19 ORA R T T ABSOLUTE_Y @01
1A NOP - F F IMPLIED
1B SLO RMW F T ABSOLUTE_Y @03
1C NOP R F T ABSOLUTE_X
1D ORA R T T ABSOLUTE_X @01
1E ASL RMW T T ABSOLUTE_X @06
1F SLO RMW F T ABSOLUTE_X @03
20 JSR W T F ABSOLUTE PUSH16(PC - 1), G(1), PC(M)
21 AND R T F PRE_INDIRECT_X T(A & T), N, Z, A
22 STP - F F IMPLIED @02
23 RLA RMW F F PRE_INDIRECT_X T(R), W, T((T << 1) | C), C(T & 0x100), W, T(A & T), N, Z, A
24 BIT R T F ZERO_PAGE N, Z(T & A), V(T & 0x40)
25 AND R T F ZERO_PAGE @21
26 ROL RMW T F ZERO_PAGE T(R), W, T((T << 1) | C), C(T & 0x100), N, Z, W
27 RLA RMW F F ZERO_PAGE @23
28 PLP - T F IMPLIED R(PC), P((P & 0x30) | (PULL & ~0x30)), IRQ_DELAY(1)
29 AND - T F IMMEDIATE @21
2A ROL - T F ACCUMULATOR T((A << 1) | C), C(T & 0x100), N, Z, A
2B ANC - F F IMMEDIATE @0B
2C BIT R T F ABSOLUTE @24
2D AND R T F ABSOLUTE @21
2E ROL RMW T F ABSOLUTE @26
2F RLA RMW F F ABSOLUTE @23
30 BMI W T F RELATIVE B(N)
31 AND R T T POST_INDIRECT_Y @21
32 STP - F F IMPLIED @02
33 RLA RMW F T POST_INDIRECT_Y @23
34 NOP R F F ZERO_PAGE_X
35 AND R T F ZERO_PAGE_X @21
36 ROL RMW T F ZERO_PAGE_X @26
37 RLA RMW F F ZERO_PAGE_X @23
38 SEC - T F IMPLIED C(1)
39 AND R T T ABSOLUTE_Y @21
3A NOP - F F IMPLIED
3B RLA RMW F T ABSOLUTE_Y @23
3C NOP R F T ABSOLUTE_X
3D AND R T T ABSOLUTE_X @21
3E ROL RMW T T ABSOLUTE_X @26
3F RLA RMW F T ABSOLUTE_X @23
40 RTI - T F IMPLIED R(PC), P((P & 0x30) | (PULL & ~0x30)), PC(PULL16)
41 EOR R T F PRE_INDIRECT_X T(A ^ T), N, Z, A
42 STP - F F IMPLIED @02
43 SRE RMW F F PRE_INDIRECT_X T(R), W, C(T & 0x01), T(T >> 1), W, T(A ^ T), N, Z, A
44 NOP R F F ZERO_PAGE
45 EOR R T F ZERO_PAGE @41
46 LSR RMW T F ZERO_PAGE T(R), W, C(T & 0x01), T(T >> 1), N, Z, W
47 SRE RMW F F ZERO_PAGE @43
48 PHA - T F IMPLIED PUSH(A)
49 EOR - T F IMMEDIATE @41
4A LSR - T F ACCUMULATOR T(A), C(T & 0x01), T(T >> 1), N, Z, A
4B ALR - F F IMMEDIATE T(A & T), C(T & 0x01), T(T >> 1), N, Z, A
4C JMP W T F ABSOLUTE PC(M)
4D EOR R T F ABSOLUTE @41
4E LSR RMW T F ABSOLUTE @46
4F SRE RMW F F ABSOLUTE @43
50 BVC W T F RELATIVE B(!V)
51 EOR R T T POST_INDIRECT_Y @41
52 STP - F F IMPLIED @02
53 SRE RMW F T POST_INDIRECT_Y @43
54 NOP R F F ZERO_PAGE_X
55 EOR R T F ZERO_PAGE_X @41
56 LSR RMW T F ZERO_PAGE_X @46
57 SRE RMW F F ZERO_PAGE_X @43
58 CLI - T F IMPLIED I(0), IRQ_DELAY(1)
59 EOR R T T ABSOLUTE_Y @41
5A NOP - F F IMPLIED
5B SRE RMW F T ABSOLUTE_Y @43
5C NOP R F T ABSOLUTE_X
5D EOR R T T ABSOLUTE_X @41
5E LSR RMW T T ABSOLUTE_X @46
5F SRE RMW F T ABSOLUTE_X @43
60 RTS - T F IMPLIED R(PC), G(1), PC(PULL16 + 1)
61 ADC R T F PRE_INDIRECT_X T(T + A + C), N(T & 0x80), Z, C(T > 0xff), V((A ^ O ^ 0x80) & (A ^ T) & 0x80), A
62 STP - F F IMPLIED @02
63 RRA RMW F F PRE_INDIRECT_X T(R), W, T(T | (C ? 0x100 : 0)), C(T & 0x01), T(T >> 1), W, M(T), T(T + A + C), N(T & 0x80), Z, C(T > 0xff), V((A ^ M ^ 0x80) & (A ^ T) & 0x80), A
64 NOP R F F ZERO_PAGE
65 ADC R T F ZERO_PAGE @61
66 ROR RMW T F ZERO_PAGE T(R), W, T(T | (C ? 0x100 : 0)), C(T & 0x01), T(T >> 1), N, Z, W
67 RRA RMW F F ZERO_PAGE @63
68 PLA - T F IMPLIED R(PC), A(PULL), N(A), Z(A)
69 ADC - T F IMMEDIATE @61
6A ROR - T F ACCUMULATOR T(A | (C ? 0x100 : 0)), C(T & 0x01), T(T >> 1), N, Z, A
6B ARR - F F IMMEDIATE T(A & T), T(T | (C ? 0x100 : 0)), T(T >> 1), C(T & 0x40), V(((T >> 6) ^ (T >> 5)) & 1), N, Z, A
6C JMP W T F INDIRECT @4C
6D ADC R T F ABSOLUTE @61
6E ROR RMW T F ABSOLUTE @66
6F RRA RMW F F ABSOLUTE @63
70 BVS W T F RELATIVE B(V)
71 ADC R T T POST_INDIRECT_Y @61
72 STP - F F IMPLIED @02
73 RRA RMW F T POST_INDIRECT_Y @63
74 NOP R F F ZERO_PAGE_X
75 ADC R T F ZERO_PAGE_X @61
76 ROR RMW T F ZERO_PAGE_X @66
77 RRA RMW F F ZERO_PAGE_X @63
78 SEI - T F IMPLIED I(1)
79 ADC R T T ABSOLUTE_Y @61
7A NOP - F F IMPLIED
7B RRA RMW F T ABSOLUTE_Y @63
7C NOP R F T ABSOLUTE_X
7D ADC R T T ABSOLUTE_X @61
7E ROR RMW T T ABSOLUTE_X @66
7F RRA RMW F T ABSOLUTE_X @63
80 NOP - F F IMMEDIATE
81 STA W T F PRE_INDIRECT_X W(A)
82 NOP - F F IMMEDIATE
83 SAX W F F PRE_INDIRECT_X W(A & X)
84 STY W T F ZERO_PAGE W(Y)
85 STA W T F ZERO_PAGE @81
86 STX W T F ZERO_PAGE W(X)
87 SAX W F F ZERO_PAGE @83
88 DEY - T F IMPLIED Y(Y - 1), N(Y), Z(Y)
89 NOP - F F IMMEDIATE
8A TXA - T F IMPLIED A(X), N(A), Z(A)
8B XAA - F F IMMEDIATE UNUSED(T), NOTIMPL
8C STY W T F ABSOLUTE @84
8D STA W T F ABSOLUTE @81
8E STX W T F ABSOLUTE @86
8F SAX W F F ABSOLUTE @83
90 BCC W T F RELATIVE B(!C)
91 STA RMW T T POST_INDIRECT_Y @81
92 STP - F F IMPLIED @02
93 AHX R F T POST_INDIRECT_Y UNUSED(T), NOTIMPL
94 STY W T F ZERO_PAGE_X @84
95 STA W T F ZERO_PAGE_X @81
96 STX W T F ZERO_PAGE_Y @86
97 SAX W F F ZERO_PAGE_Y @83
98 TYA - T F IMPLIED A(Y), N(A), Z(A)
99 STA RMW T T ABSOLUTE_Y @81
9A TXS - T F IMPLIED S(X)
9B TAS R F T ABSOLUTE_Y UNUSED(T), NOTIMPL
9C SHY RMW F T ABSOLUTE_X T(Y & ((((M - X) >> 8) + 1) & 0xff)), M((((M - X) >> 8) == (M >> 8)) ? M : ((T << 8) | (M & 0xff))), W
9D STA RMW T T ABSOLUTE_X @81
9E SHX RMW F T ABSOLUTE_Y T(X & ((((M - Y) >> 8) + 1) & 0xff)), M((((M - Y) >> 8) == (M >> 8)) ? M : ((T << 8) | (M & 0xff))), W
9F AHX R F T ABSOLUTE_Y @93
A0 LDY - T F IMMEDIATE N, Z, Y
A1 LDA R T F PRE_INDIRECT_X N, Z, A
A2 LDX - T F IMMEDIATE N, Z, X
A3 LAX R F F PRE_INDIRECT_X A, X, N, Z
A4 LDY R T F ZERO_PAGE @A0
A5 LDA R T F ZERO_PAGE @A1
A6 LDX R T F ZERO_PAGE @A2
A7 LAX R F F ZERO_PAGE @A3
A8 TAY - T F IMPLIED Y(A), N(Y), Z(Y)
A9 LDA - T F IMMEDIATE @A1
AA TAX - T F IMPLIED X(A), N(X), Z(X)
AB LAX - F F IMMEDIATE @A3
AC LDY R T F ABSOLUTE @A0
AD LDA R T F ABSOLUTE @A1
AE LDX R T F ABSOLUTE @A2
AF LAX R F F ABSOLUTE @A3
B0 BCS W T F RELATIVE B(C)
B1 LDA R T T POST_INDIRECT_Y @A1
B2 STP - F F IMPLIED @02
B3 LAX R F T POST_INDIRECT_Y @A3
B4 LDY R T F ZERO_PAGE_X @A0
B5 LDA R T F ZERO_PAGE_X @A1
B6 LDX R T F ZERO_PAGE_Y @A2
B7 LAX R F F ZERO_PAGE_Y @A3
B8 CLV - T F IMPLIED V(0)
B9 LDA R T T ABSOLUTE_Y @A1
BA TSX - T F IMPLIED X(S), N(X), Z(X)
BB LAS R F T ABSOLUTE_Y UNUSED(T), NOTIMPL
BC LDY R T T ABSOLUTE_X @A0
BD LDA R T T ABSOLUTE_X @A1
BE LDX R T T ABSOLUTE_Y @A2
BF LAX R F T ABSOLUTE_Y @A3
C0 CPY - T F IMMEDIATE T(Y - T), C(T < 0x100), N, Z
C1 CMP R T F PRE_INDIRECT_X T(A - T), C(T < 0x100), N, Z
C2 NOP - F F IMMEDIATE
C3 DCP RMW F F PRE_INDIRECT_X T(R), W, T((T - 1) & 0xff), W, T(A - T), C(T < 0x100), N, Z
C4 CPY R T F ZERO_PAGE @C0
C5 CMP R T F ZERO_PAGE @C1
C6 DEC RMW T F ZERO_PAGE T(R), W, T(T - 1), N, Z, W
C7 DCP RMW F F ZERO_PAGE @C3
C8 INY - T F IMPLIED Y(Y + 1), N(Y), Z(Y)
C9 CMP - T F IMMEDIATE @C1
CA DEX - T F IMPLIED X(X - 1), N(X), Z(X)
CB AXS - F F IMMEDIATE T((A & X) - T), C(T < 0x100), N, Z, X
CC CPY R T F ABSOLUTE @C0
CD CMP R T F ABSOLUTE @C1
CE DEC RMW T F ABSOLUTE @C6
CF DCP RMW F F ABSOLUTE @C3
D0 BNE W T F RELATIVE B(!Z)
D1 CMP R T T POST_INDIRECT_Y @C1
D2 STP - F F IMPLIED @02
D3 DCP RMW F T POST_INDIRECT_Y @C3
D4 NOP R F F ZERO_PAGE_X
D5 CMP R T F ZERO_PAGE_X @C1
D6 DEC RMW T F ZERO_PAGE_X @C6
D7 DCP RMW F F ZERO_PAGE_X @C3
D8 CLD - T F IMPLIED D(0)
D9 CMP R T T ABSOLUTE_Y @C1
DA NOP - F F IMPLIED
DB DCP RMW F T ABSOLUTE_Y @C3
DC NOP R F T ABSOLUTE_X
DD CMP R T T ABSOLUTE_X @C1
DE DEC RMW T T ABSOLUTE_X @C6
DF DCP RMW F T ABSOLUTE_X @C3
E0 CPX - T F IMMEDIATE T(X - T), C(T < 0x100), N, Z
E1 SBC R T F PRE_INDIRECT_X T(A - T - (C ? 0 : 1)), N, Z, V((A ^ T) & (A ^ O) & 0x80), C(T < 0x100), A
E2 NOP - F F IMMEDIATE
E3 ISC RMW F F PRE_INDIRECT_X T(R), W, T((T + 1) & 0xff), W, M(T), T(A - T - (C ? 0 : 1)), N, Z, V((A ^ T) & (A ^ M) & 0x80), C(T < 0x100), A
E4 CPX R T F ZERO_PAGE @E0
E5 SBC R T F ZERO_PAGE @E1
E6 INC RMW T F ZERO_PAGE T(R), W, T(T + 1), N, Z, W
E7 ISC RMW F F ZERO_PAGE @E3
E8 INX - T F IMPLIED X(X + 1), N(X), Z(X)
E9 SBC - T F IMMEDIATE @E1
EA NOP - T F IMPLIED
EB SBC - F F IMMEDIATE @E1
EC CPX R T F ABSOLUTE @E0
ED SBC R T F ABSOLUTE @E1
EE INC RMW T F ABSOLUTE @E6
EF ISC RMW F F ABSOLUTE @E3
F0 BEQ W T F RELATIVE B(Z)
F1 SBC R T T POST_INDIRECT_Y @E1
F2 STP - F F IMPLIED @02
F3 ISC RMW F T POST_INDIRECT_Y @E3
F4 NOP R F F ZERO_PAGE_X
F5 SBC R T F ZERO_PAGE_X @E1
F6 INC RMW T F ZERO_PAGE_X @E6
F7 ISC RMW F F ZERO_PAGE_X @E3
F8 SED - T F IMPLIED D(1)
F9 SBC R T T ABSOLUTE_Y @E1
FA NOP - F F IMPLIED
FB ISC RMW F T ABSOLUTE_Y @E3
FC NOP R F T ABSOLUTE_X
FD SBC R T T ABSOLUTE_X @E1
FE INC RMW T T ABSOLUTE_X @E6
FF ISC RMW F T ABSOLUTE_X @E3