-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoOpcodes.go
160 lines (128 loc) · 2.68 KB
/
noOpcodes.go
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
package nmos6502
/*
NOPs (including DOP, TOP)
Instructions effecting in 'no operations' in various address modes. Operands are ignored.
N Z C I D V
- - - - - -
opc addressing bytes cycles
1A implied 1 2
3A implied 1 2
5A implied 1 2
7A implied 1 2
DA implied 1 2
FA implied 1 2
80 immediate 2 2
82 immediate 2 2
89 immediate 2 2
C2 immediate 2 2
E2 immediate 2 2
04 zeropage 2 3
44 zeropage 2 3
64 zeropage 2 3
14 zeropage,X 2 4
34 zeropage,X 2 4
54 zeropage,X 2 4
74 zeropage,X 2 4
D4 zeropage,X 2 4
F4 zeropage,X 2 4
0C absolute 3 4
1C absolut,X 3 4*
3C absolut,X 3 4*
5C absolut,X 3 4*
7C absolut,X 3 4*
DC absolut,X 3 4*
FC absolut,X 3 4*
*/
func (cpu *CPU) opcode0x1A() (byte, bool) { // TAY
return 2, false
}
func (cpu *CPU) opcode0x3A() (byte, bool) { // TRB
return 2, false
}
func (cpu *CPU) opcode0x5A() (byte, bool) { // PHA
return 2, false
}
func (cpu *CPU) opcode0x7A() (byte, bool) { // PLA
return 2, false
}
func (cpu *CPU) opcode0xDA() (byte, bool) { // PHX
return 2, false
}
func (cpu *CPU) opcode0xFA() (byte, bool) { // PLX
return 2, false
}
func (cpu *CPU) opcode0x80() (byte, bool) { // BRA
return 2, true
}
func (cpu *CPU) opcode0x82() (byte, bool) { // BRA
return 2, true
}
func (cpu *CPU) opcode0x89() (byte, bool) { // BRA
return 2, true
}
func (cpu *CPU) opcode0xC2() (byte, bool) { // BRA
return 2, true
}
func (cpu *CPU) opcode0xE2() (byte, bool) { // BRA
return 2, true
}
func (cpu *CPU) opcode0x04() (byte, bool) { // NOP
return 3, false
}
func (cpu *CPU) opcode0x44() (byte, bool) { // NOP
return 3, false
}
func (cpu *CPU) opcode0x64() (byte, bool) { // NOP
return 3, false
}
func (cpu *CPU) opcode0x14() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0x34() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0x54() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0x74() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0xD4() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0xF4() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0x0C() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0x1C() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0x3C() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0x5C() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0x7C() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0xDC() (byte, bool) { // NOP
return 4, false
}
func (cpu *CPU) opcode0xFC() (byte, bool) { // NOP
return 4, false
}
/*
NOP
No Operation
---
N Z C I D V
- - - - - -
addressing assembler opc bytes cycles
implied NOP EA 1 2
*/
func (cpu *CPU) opcode0xEA() (byte, bool) {
return 2, false
}