-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht65_cmp_16c.a65
237 lines (195 loc) · 2.88 KB
/
t65_cmp_16c.a65
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
; Test for cmp_16 part A
.include "test65.i65"
.include "../asminc/set_16.i65"
.include "../asminc/cmp_16.i65"
.export _main
.pc02
.zeropage
zpv: .res 2
ptr: .res 2
.data
abv: .res 12
.code
_main:
; Test value set is $0000, $0001, $FFFF (-$0001), $7000, $9000 (-$7000)
; Test conditions
; unsigned < !C
; = (Z) also C
; > C & !Z
; signed < (N xor V) & !Z
; = Z also !N, !V
; > (N xnor V) & !Z
;
; For zero page indirect variables.
set_16 ptr,abv
set_16 (ptr),$0000
cmp_16 (ptr), $0000
fail_mi 10
fail_vs 11
fail_ne 12
fail_cc 13
cmp_16 (ptr), $0001
bvs :+
fail_pl 15
bra :++
: fail_mi 16
: fail_eq 17
fail_cs 18
cmp_16 (ptr), $FFFF
bvs :+
fail_mi 19
bra :++
: fail_pl 20
: fail_eq 21
fail_cs 22
cmp_16 (ptr), $7000
bvs :+
fail_pl 23
bra :++
: fail_mi 24
: fail_eq 25
fail_cs 26
cmp_16 (ptr), $9000
bvs :+
fail_mi 27
bra :++
: fail_pl 28
: fail_eq 29
fail_cs 30
set_16 (ptr), $0001
cmp_16 (ptr), $0000
bvs :+
fail_mi 31
bra :++
: fail_pl 32
: fail_eq 33
fail_cc 34
cmp_16 (ptr), $0001
fail_mi 35
fail_vs 36
fail_ne 37
fail_cc 38
cmp_16 (ptr), $FFFF
bvs :+
fail_mi 39
bra :++
: fail_pl 40
: fail_eq 41
fail_cs 42
cmp_16 (ptr), $7000
bvs :+
fail_pl 43
bra :++
: fail_mi 44
: fail_eq 45
fail_cs 46
cmp_16 (ptr), $9000
bvs :+
fail_mi 47
bra :++
: fail_pl 48
: fail_eq 49
fail_cs 50
set_16 (ptr), $FFFF
cmp_16 (ptr), $0000
bvs :+
fail_pl 51
bra :++
: fail_mi 52
: fail_eq 53
fail_cc 54
cmp_16 (ptr), $0001
bvs :+
fail_pl 55
bra :++
: fail_mi 56
: fail_eq 57
fail_cc 58
cmp_16 (ptr), $FFFF
fail_mi 59
fail_vs 60
fail_ne 61
fail_cc 62
cmp_16 (ptr), $7000
bvs :+
fail_pl 63
bra :++
: fail_mi 64
: fail_eq 65
fail_cc 66
cmp_16 (ptr), $9000
bvs :+
fail_mi 67
bra :++
: fail_pl 68
: fail_eq 69
fail_cc 70
set_16 (ptr), $7000
cmp_16 (ptr), $0000
bvs :+
fail_mi 71
bra :++
: fail_pl 72
: fail_eq 73
fail_cc 74
cmp_16 (ptr), $0001
bvs :+
fail_mi 75
bra :++
: fail_pl 76
: fail_eq 77
fail_cc 78
cmp_16 (ptr), $FFFF
bvs :+
fail_mi 79
bra :++
: fail_pl 80
: fail_eq 81
fail_cs 82
cmp_16 (ptr), $7000
fail_mi 83
fail_vs 84
fail_ne 85
fail_cc 86
cmp_16 (ptr), $9000
bvs :+
fail_mi 87
bra :++
: fail_pl 88
: fail_eq 89
fail_cs 90
set_16 (ptr), $9000
cmp_16 (ptr), $0000
bvs :+
fail_pl 91
bra :++
: fail_mi 92
: fail_eq 93
fail_cc 94
cmp_16 (ptr), $0001
bvs :+
fail_pl 95
bra :++
: fail_mi 96
: fail_eq 97
fail_cc 98
cmp_16 (ptr), $FFFF
bvs :+
fail_pl 99
bra :++
: fail_mi 100
: fail_eq 101
fail_cs 102
cmp_16 (ptr), $7000
bvs :+
fail_pl 103
bra :++
: fail_mi 104
: fail_eq 105
fail_cc 106
cmp_16 (ptr), $9000
fail_mi 107
fail_vs 108
fail_ne 109
fail_cc 110
tests_pass