aboutsummaryrefslogtreecommitdiff
path: root/src/test/spc700
blob: bccdea06b0d0e2fc44f2b658b6f8f0b74725d844 (plain)
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
		processor	spc700

inm	equ	$e5
labs	equ	$ffe5
dp	equ	$80

  MOV    A, #inm
  MOV    A, (X)
  MOV    A, (X)+
  MOV    A, dp
  MOV    A, dp+X
  MOV    A, labs
  MOV    A, labs+X
  MOV    A, labs+Y
  MOV    A, (dp+X)
  MOV    A, (dp)+Y
  MOV    X, #inm
  MOV    X, dp
  MOV    X, dp+Y
  MOV    X, labs
  MOV    Y, #inm
  MOV    Y, dp
  MOV    Y, dp+X
  MOV    Y, labs
  MOV    (X),A
  MOV    (X)+,A
  MOV    dp,A
  MOV    dp+X,A
  MOV    labs,A
  MOV    labs+X,A
  MOV    labs+Y,A
  MOV    (dp+X),A
  MOV    (dp)+Y,A
  MOV    dp,X
  MOV    dp+Y,X
  MOV    labs,X
  MOV    dp,Y
  MOV    dp+X,Y
  MOV    labs,Y
  MOV    A, X
  MOV    A, Y
  MOV    X, A
  MOV    Y, A
  MOV    X, SP
  MOV    SP, X
  MOV    dp,dp
  MOV    dp,#inm
  ADC    A,#inm
  ADC    A,(X)
  ADC    A,dp
  ADC    A,dp+X
  ADC    A,labs
  ADC    A,labs+X
  ADC    A,labs+Y
  ADC    A,(dp+X)
  ADC    A,(dp)+Y
  ADC    (X),(Y)
  ADC    dp,dp
  ADC    dp,#inm
  SBC    A,#inm
  SBC    A,(X)
  SBC    A,dp
  SBC    A,dp+X
  SBC    A,labs
  SBC    A,labs+X
  SBC    A,labs+Y
  SBC    A,(dp+X)
  SBC    A,(dp)+Y
  SBC    (X),(Y)
  SBC    dp,dp
  SBC    dp,#inm
  CMP    A,#inm
  CMP    A,(X)
  CMP    A,dp
  CMP    A,dp+X
  CMP    A,labs
  CMP    A,labs+X
  CMP    A,labs+Y
  CMP    A,(dp+X)
  CMP    A,(dp)+Y
  CMP    (X),(Y)
  CMP    dp,dp
  CMP    dp,#inm
  CMP    X,#inm
  CMP    X,dp
  CMP    X,labs
  CMP    Y,#inm
  CMP    Y,dp
  CMP    Y,labs
  AND    A,#inm
  AND    A,(X)
  AND    A,dp
  AND    A,dp+X
  AND    A,labs
  AND    A,labs+X
  AND    A,labs+Y
  AND    A,(dp+X)
  AND    A,(dp)+Y
  AND    (X),(Y)
  AND    dp,dp
  AND    dp,#inm
  OR     A,#inm
  OR     A,(X)
  OR     A,dp
  OR     A,dp+X
  OR     A,labs
  OR     A,labs+X
  OR     A,labs+Y
  OR     A,(dp+X)
  OR     A,(dp)+Y
  OR     (X),(Y)
  OR     dp,dp
  OR     dp,#inm
  EOR    A,#inm
  EOR    A,(X)
  EOR    A,dp
  EOR    A,dp+X
  EOR    A,labs
  EOR    A,labs+X
  EOR    A,labs+Y
  EOR    A,(dp+X)
  EOR    A,(dp)+Y
  EOR    (X),(Y)
  EOR    dp,dp
  EOR    dp,#inm
  INC      A
  INC      dp
  INC     dp+X
  INC     labs
  INC      X
  INC      Y
  DEC      A
  DEC      dp
  DEC     dp+X
  DEC     labs
  DEC      X
  DEC      Y
  ASL      A
  ASL      dp
  ASL     dp+X
  ASL     labs
  LSR      A
  LSR      dp
  LSR     dp+X
  LSR     labs
  ROL      A
  ROL      dp
  ROL     dp+X
  ROL     labs
  ROR      A
  ROR      dp
  ROR     dp+X
  ROR     labs
  XCN      A
  
  MOVW     YA,dp
  MOVW     dp,YA
  INCW     dp
  DECW     dp
  ADDW    YA,dp
  SUBW    YA,dp
  CMPW    YA,dp
  MUL      YA
  DIV      YA,X
  DAA       A
  DAS       A
  BRA     rel
  BEQ     rel
  BNE     rel
  BCS     rel
  BCC     rel
  BVS     rel
  BVC     rel
  BMI     rel
  BPL     rel
  BBS0  dp,rel   
  BBS1  dp,rel   
  BBS2  dp,rel   
  BBS3  dp,rel   
  BBS4  dp,rel   
  BBS5  dp,rel   
  BBS6  dp,rel   
  BBS7  dp,rel   
  BBC0  dp,rel 
  BBC1  dp,rel 
  BBC2  dp,rel 
  BBC3  dp,rel 
  BBC4  dp,rel 
  BBC5  dp,rel 
  BBC6  dp,rel 
  BBC7  dp,rel 
  CBNE   dp,rel
  CBNE  dp+X,rel
  DBNZ   dp,rel
  DBNZ    Y,rel
  JMP     labs
  JMP    (labs+X)
  CALL     labs
  PCALL   $ff00
  TCALL     7
  BRK
rel:
                                                                       
  RET
  RETI
  PUSH      A
  PUSH      X
  PUSH      Y
  PUSH     PSW
  POP       A
  POP       X
  POP       Y
  POP      PSW
  SET0    dp
  SET1    dp
  SET2    dp
  SET3    dp
  SET4    dp
  SET5    dp
  SET6    dp
  SET7    dp
  CLR0    dp
  CLR1    dp
  CLR2    dp
  CLR3    dp
  CLR4    dp
  CLR5    dp
  CLR6    dp
  CLR7    dp
  
  TSET1    labs
  TCLR1    labs
  
  AND1   C,$1234.$05
  AND1   C,/$1234.$05
  OR1    C,$1234.$05
  OR1    C,/$1234.$05
  EOR1   C,$1234.$05
  NOT1   $1234.$05
  MOV1   C,$1234.$05
  MOV1   $1234.$05,C
  CLRC
  SETC
  NOTC
  CLRV
  CLRP
  SETP
  EI
  DI
  NOP
  SLEEP
  STOP