1 |
2 |
olivier.gi |
/*===========================================================================*/
|
2 |
|
|
/* Copyright (C) 2001 Authors */
|
3 |
|
|
/* */
|
4 |
|
|
/* This source file may be used and distributed without restriction provided */
|
5 |
|
|
/* that this copyright statement is not removed from the file and that any */
|
6 |
|
|
/* derivative work contains the original copyright notice and the associated */
|
7 |
|
|
/* disclaimer. */
|
8 |
|
|
/* */
|
9 |
|
|
/* This source file is free software; you can redistribute it and/or modify */
|
10 |
|
|
/* it under the terms of the GNU Lesser General Public License as published */
|
11 |
|
|
/* by the Free Software Foundation; either version 2.1 of the License, or */
|
12 |
|
|
/* (at your option) any later version. */
|
13 |
|
|
/* */
|
14 |
|
|
/* This source is distributed in the hope that it will be useful, but WITHOUT*/
|
15 |
|
|
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
|
16 |
|
|
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
|
17 |
|
|
/* License for more details. */
|
18 |
|
|
/* */
|
19 |
|
|
/* You should have received a copy of the GNU Lesser General Public License */
|
20 |
|
|
/* along with this source; if not, write to the Free Software Foundation, */
|
21 |
|
|
/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
|
22 |
|
|
/* */
|
23 |
|
|
/*===========================================================================*/
|
24 |
|
|
/* TWO-OPERAND ARITHMETIC: MOV.B INSTRUCTION */
|
25 |
|
|
/*---------------------------------------------------------------------------*/
|
26 |
|
|
/* Test the MOV.B instruction with all addressing modes */
|
27 |
18 |
olivier.gi |
/* */
|
28 |
|
|
/* Author(s): */
|
29 |
|
|
/* - Olivier Girard, olgirard@gmail.com */
|
30 |
|
|
/* */
|
31 |
|
|
/*---------------------------------------------------------------------------*/
|
32 |
|
|
/* $Rev: 17 $ */
|
33 |
|
|
/* $LastChangedBy: olivier.girard $ */
|
34 |
|
|
/* $LastChangedDate: 2009-08-04 23:15:39 +0200 (Tue, 04 Aug 2009) $ */
|
35 |
2 |
olivier.gi |
/*===========================================================================*/
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
.global main
|
39 |
|
|
|
40 |
|
|
main:
|
41 |
|
|
/* ---------------------- INITIALIZE REGISTERS --------------------- */
|
42 |
|
|
mov #0x2222, r2
|
43 |
|
|
mov #0x3333, r3
|
44 |
|
|
mov #0x4444, r4
|
45 |
|
|
mov #0x5555, r5
|
46 |
|
|
mov #0x6666, r6
|
47 |
|
|
mov #0x7777, r7
|
48 |
|
|
mov #0x8888, r8
|
49 |
|
|
mov #0x9999, r9
|
50 |
|
|
mov #0xaaaa, r10
|
51 |
|
|
mov #0xbbbb, r11
|
52 |
|
|
mov #0xcccc, r12
|
53 |
|
|
mov #0xdddd, r13
|
54 |
|
|
mov #0xeeee, r14
|
55 |
|
|
|
56 |
|
|
mov #0x1000, r15
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
/* ---------------------- TEST WHEN SOURCE IS Rn ------------------- */
|
60 |
|
|
.set Rn_EDEL, (__data_start+0x0014)
|
61 |
|
|
.set Rn_EDEH, (__data_start+0x0017)
|
62 |
|
|
.set Rn_TONYL, 0x0218
|
63 |
|
|
.set Rn_TONYH, 0x021B
|
64 |
|
|
|
65 |
|
|
mov.b r5, r4 ;# Overwrite r4 with 0x0055
|
66 |
|
|
|
67 |
|
|
mov #0x0200, r5
|
68 |
|
|
mov #0xaaaa, &0x210
|
69 |
|
|
mov #0x1234, r6
|
70 |
|
|
mov.b r6, 16(r5) ;# Write 0x34 to memory @0x0210
|
71 |
|
|
mov #0x5555, &0x212
|
72 |
|
|
mov #0x5678, r6
|
73 |
|
|
mov.b r6, 19(r5) ;# Write 0x78 to memory @0x0213
|
74 |
|
|
|
75 |
|
|
mov #0x1111, &0x214
|
76 |
|
|
mov #0xabcd, r7
|
77 |
|
|
mov.b r7, Rn_EDEL ;# Write 0xcd to memory @0x0214
|
78 |
|
|
mov #0x9999, &0x216
|
79 |
|
|
mov #0xef12, r7
|
80 |
|
|
mov.b r7, Rn_EDEH ;# Write 0x12 to memory @0x0217
|
81 |
|
|
|
82 |
|
|
mov #0x7777, &0x218
|
83 |
|
|
mov #0x1f2e, r8
|
84 |
|
|
mov.b r8, &Rn_TONYL ;# Write 0x2e to memory @0x0218
|
85 |
|
|
mov #0x3333, &0x21A
|
86 |
|
|
mov #0x3d4c, r8
|
87 |
|
|
mov.b r8, &Rn_TONYH ;# Write 0x4c to memory @0x021B
|
88 |
|
|
|
89 |
|
|
mov #0x2000, r15
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
/* ---------------------- TEST WHEN SOURCE IS @Rn ------------------ */
|
93 |
|
|
.set aRn_EDE_218, (__data_start+0x0018)
|
94 |
|
|
.set aRn_EDE_21B, (__data_start+0x001B)
|
95 |
|
|
.set aRn_EDE_21C, (__data_start+0x001C)
|
96 |
|
|
.set aRn_EDE_21F, (__data_start+0x001F)
|
97 |
|
|
|
98 |
|
|
.set aRn_TONY_220, 0x0220
|
99 |
|
|
.set aRn_TONY_223, 0x0223
|
100 |
|
|
.set aRn_TONY_224, 0x0224
|
101 |
|
|
.set aRn_TONY_227, 0x0227
|
102 |
|
|
|
103 |
|
|
|
104 |
|
|
mov #0x2233, &0x0210
|
105 |
|
|
mov #0x0210, r4
|
106 |
|
|
mov #0xffff, r5
|
107 |
|
|
mov.b @r4, r5 ;# r5 takes @0x0210 value: 0x0033
|
108 |
|
|
mov #0x4455, &0x0212
|
109 |
|
|
mov #0x0213, r4
|
110 |
|
|
mov #0xffff, r6
|
111 |
|
|
mov.b @r4, r6 ;# r6 takes @0x0213 value: 0x0044
|
112 |
|
|
|
113 |
|
|
mov #0x1122, &0x0200
|
114 |
|
|
mov #0x3344, &0x0202
|
115 |
|
|
mov #0x5566, &0x0204
|
116 |
|
|
mov #0x7788, &0x0206
|
117 |
|
|
mov #0x0200, r7
|
118 |
|
|
mov #0xaaaa, &0x0210
|
119 |
|
|
mov #0x5555, &0x0212
|
120 |
|
|
mov #0x5a5a, &0x0214
|
121 |
|
|
mov #0xa5a5, &0x0216
|
122 |
|
|
|
123 |
|
|
mov #0x0200, r8
|
124 |
|
|
mov.b @r8, 16(r7) ;# Move memory @0x200 (0x22) to memory @0x210
|
125 |
|
|
mov #0x0202, r8
|
126 |
|
|
mov.b @r8, 19(r7) ;# Move memory @0x202 (0x44) to memory @0x213
|
127 |
|
|
mov #0x0205, r8
|
128 |
|
|
mov.b @r8, 20(r7) ;# Move memory @0x205 (0x55) to memory @0x214
|
129 |
|
|
mov #0x0207, r8
|
130 |
|
|
mov.b @r8, 23(r7) ;# Move memory @0x207 (0x77) to memory @0x217
|
131 |
|
|
|
132 |
|
|
mov #0x99aa, &0x0200
|
133 |
|
|
mov #0xbbcc, &0x0202
|
134 |
|
|
mov #0xddee, &0x0204
|
135 |
|
|
mov #0xff11, &0x0206
|
136 |
|
|
mov #0x1111, &0x0218
|
137 |
|
|
mov #0xeeee, &0x021A
|
138 |
|
|
mov #0x1e1e, &0x021C
|
139 |
|
|
mov #0xe1e1, &0x021E
|
140 |
|
|
|
141 |
|
|
mov #0x0200, r8
|
142 |
|
|
mov.b @r8, aRn_EDE_218 ;# Move memory @0x200 (0xaa) to memory @0x218
|
143 |
|
|
mov #0x0202, r8
|
144 |
|
|
mov.b @r8, aRn_EDE_21B ;# Move memory @0x202 (0xcc) to memory @0x21B
|
145 |
|
|
mov #0x0205, r8
|
146 |
|
|
mov.b @r8, aRn_EDE_21C ;# Move memory @0x205 (0xdd) to memory @0x21C
|
147 |
|
|
mov #0x0207, r8
|
148 |
|
|
mov.b @r8, aRn_EDE_21F ;# Move memory @0x207 (0xff) to memory @0x21F
|
149 |
|
|
|
150 |
|
|
mov #0x2233, &0x0200
|
151 |
|
|
mov #0x4455, &0x0202
|
152 |
|
|
mov #0x6677, &0x0204
|
153 |
|
|
mov #0x8899, &0x0206
|
154 |
|
|
mov #0x2222, &0x0220
|
155 |
|
|
mov #0xdddd, &0x0222
|
156 |
|
|
mov #0x2d2d, &0x0224
|
157 |
|
|
mov #0xd2d2, &0x0226
|
158 |
|
|
|
159 |
|
|
mov #0x0200, r8
|
160 |
|
|
mov.b @r8, &aRn_TONY_220 ;# Move memory @0x200 (0x33) to memory @0x220
|
161 |
|
|
mov #0x0202, r8
|
162 |
|
|
mov.b @r8, &aRn_TONY_223 ;# Move memory @0x202 (0x55) to memory @0x223
|
163 |
|
|
mov #0x0205, r8
|
164 |
|
|
mov.b @r8, &aRn_TONY_224 ;# Move memory @0x205 (0x66) to memory @0x224
|
165 |
|
|
mov #0x0207, r8
|
166 |
|
|
mov.b @r8, &aRn_TONY_227 ;# Move memory @0x207 (0x88) to memory @0x227
|
167 |
|
|
|
168 |
|
|
mov #0x3000, r15
|
169 |
|
|
|
170 |
|
|
|
171 |
|
|
/* ---------------------- TEST WHEN SOURCE IS @Rn+ ----------------- */
|
172 |
|
|
.set aRni_EDE_218, (__data_start+0x0018)
|
173 |
|
|
.set aRni_EDE_21B, (__data_start+0x001B)
|
174 |
|
|
.set aRni_EDE_21C, (__data_start+0x001C)
|
175 |
|
|
.set aRni_EDE_21F, (__data_start+0x001F)
|
176 |
|
|
|
177 |
|
|
.set aRni_TONY_220, 0x0220
|
178 |
|
|
.set aRni_TONY_223, 0x0223
|
179 |
|
|
.set aRni_TONY_224, 0x0224
|
180 |
|
|
.set aRni_TONY_227, 0x0227
|
181 |
|
|
|
182 |
|
|
|
183 |
|
|
mov #0x2233, &0x0210
|
184 |
|
|
mov #0x0210, r4
|
185 |
|
|
mov #0xffff, r5
|
186 |
|
|
mov.b @r4+, r5 ;# r5 takes @0x0210 value: 0x0033
|
187 |
|
|
mov #0x4455, &0x0212
|
188 |
|
|
mov #0x0213, r6
|
189 |
|
|
mov #0xffff, r7
|
190 |
|
|
mov.b @r6+, r7 ;# r7 takes @0x0213 value: 0x0044
|
191 |
|
|
|
192 |
|
|
mov #0x1122, &0x0200
|
193 |
|
|
mov #0x3344, &0x0202
|
194 |
|
|
mov #0x5566, &0x0204
|
195 |
|
|
mov #0x7788, &0x0206
|
196 |
|
|
mov #0x0200, r8
|
197 |
|
|
mov #0xaaaa, &0x0210
|
198 |
|
|
mov #0x5555, &0x0212
|
199 |
|
|
mov #0x5a5a, &0x0214
|
200 |
|
|
mov #0xa5a5, &0x0216
|
201 |
|
|
|
202 |
|
|
mov #0x0200, r9
|
203 |
|
|
mov.b @r9+, 16(r8) ;# Move memory @0x200 (0x22) to memory @0x210
|
204 |
|
|
mov.b @r9+, r10
|
205 |
|
|
mov.b @r9+, 19(r8) ;# Move memory @0x202 (0x44) to memory @0x213
|
206 |
|
|
mov @r9+, r10
|
207 |
|
|
mov.b @r9+, 20(r8) ;# Move memory @0x205 (0x55) to memory @0x214
|
208 |
|
|
mov.b @r9+, r10
|
209 |
|
|
mov.b @r9+, 23(r8) ;# Move memory @0x207 (0x77) to memory @0x217
|
210 |
|
|
|
211 |
|
|
mov #0x99aa, &0x0200
|
212 |
|
|
mov #0xbbcc, &0x0202
|
213 |
|
|
mov #0xddee, &0x0204
|
214 |
|
|
mov #0xff11, &0x0206
|
215 |
|
|
mov #0x1111, &0x0218
|
216 |
|
|
mov #0xeeee, &0x021A
|
217 |
|
|
mov #0x1e1e, &0x021C
|
218 |
|
|
mov #0xe1e1, &0x021E
|
219 |
|
|
|
220 |
|
|
mov #0x0200, r10
|
221 |
|
|
mov.b @r10+, aRni_EDE_218 ;# Move memory @0x200 (0xaa) to memory @0x218
|
222 |
|
|
mov.b @r10+, r11
|
223 |
|
|
mov.b @r10+, aRni_EDE_21B ;# Move memory @0x202 (0xcc) to memory @0x21B
|
224 |
|
|
mov @r10+, r11
|
225 |
|
|
mov.b @r10+, aRni_EDE_21C ;# Move memory @0x205 (0xdd) to memory @0x21C
|
226 |
|
|
mov.b @r10+, r11
|
227 |
|
|
mov.b @r10+, aRni_EDE_21F ;# Move memory @0x207 (0xff) to memory @0x21F
|
228 |
|
|
|
229 |
|
|
mov #0x2233, &0x0200
|
230 |
|
|
mov #0x4455, &0x0202
|
231 |
|
|
mov #0x6677, &0x0204
|
232 |
|
|
mov #0x8899, &0x0206
|
233 |
|
|
mov #0x2222, &0x0220
|
234 |
|
|
mov #0xdddd, &0x0222
|
235 |
|
|
mov #0x2d2d, &0x0224
|
236 |
|
|
mov #0xd2d2, &0x0226
|
237 |
|
|
|
238 |
|
|
mov #0x0200, r11
|
239 |
|
|
mov.b @r11+, &aRni_TONY_220 ;# Move memory @0x200 (0x33) to memory @0x220
|
240 |
|
|
mov.b @r11+, r12
|
241 |
|
|
mov.b @r11+, &aRni_TONY_223 ;# Move memory @0x202 (0x55) to memory @0x223
|
242 |
|
|
mov @r11+, r12
|
243 |
|
|
mov.b @r11+, &aRni_TONY_224 ;# Move memory @0x205 (0x66) to memory @0x224
|
244 |
|
|
mov.b @r11+, r12
|
245 |
|
|
mov.b @r11+, &aRni_TONY_227 ;# Move memory @0x207 (0x88) to memory @0x227
|
246 |
|
|
|
247 |
|
|
mov #0x4000, r15
|
248 |
|
|
|
249 |
|
|
|
250 |
|
|
/* ---------------------- TEST WHEN SOURCE IS #N ------------------- */
|
251 |
|
|
.set N_EDE_218, (__data_start+0x0018)
|
252 |
|
|
.set N_EDE_21B, (__data_start+0x001B)
|
253 |
|
|
.set N_EDE_21C, (__data_start+0x001C)
|
254 |
|
|
.set N_EDE_21F, (__data_start+0x001F)
|
255 |
|
|
|
256 |
|
|
.set N_TONY_220, 0x0220
|
257 |
|
|
.set N_TONY_223, 0x0223
|
258 |
|
|
.set N_TONY_224, 0x0224
|
259 |
|
|
.set N_TONY_227, 0x0227
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
mov #0xffff, r4
|
263 |
|
|
mov.b #0x1234, r4 ;# r4 takes 0x0034 value
|
264 |
|
|
|
265 |
|
|
mov #0x0200, r5
|
266 |
|
|
mov #0xaaaa, &0x0210
|
267 |
|
|
mov #0x5555, &0x0212
|
268 |
|
|
mov #0x5a5a, &0x0214
|
269 |
|
|
mov #0xa5a5, &0x0216
|
270 |
|
|
mov.b #0x1122, 16(r5) ;# Move value 0x22 to memory @0x210
|
271 |
|
|
mov.b #0x3344, 19(r5) ;# Move value 0x44 to memory @0x213
|
272 |
|
|
mov.b #0x5566, 20(r5) ;# Move value 0x66 to memory @0x214
|
273 |
|
|
mov.b #0x7788, 23(r5) ;# Move value 0x88 to memory @0x217
|
274 |
|
|
|
275 |
|
|
|
276 |
|
|
mov #0x1111, &0x0218
|
277 |
|
|
mov #0xeeee, &0x021A
|
278 |
|
|
mov #0x1e1e, &0x021C
|
279 |
|
|
mov #0xe1e1, &0x021E
|
280 |
|
|
mov.b #0x99aa, N_EDE_218 ;# Move value 0xaa to memory @0x218
|
281 |
|
|
mov.b #0xbbcc, N_EDE_21B ;# Move value 0xcc to memory @0x21B
|
282 |
|
|
mov.b #0xddee, N_EDE_21C ;# Move value 0xee to memory @0x21C
|
283 |
|
|
mov.b #0xff11, N_EDE_21F ;# Move value 0x11 to memory @0x21F
|
284 |
|
|
|
285 |
|
|
mov #0xaaaa, &0x0220
|
286 |
|
|
mov #0xeeee, &0x0222
|
287 |
|
|
mov #0xaeae, &0x0224
|
288 |
|
|
mov #0xeaea, &0x0226
|
289 |
|
|
mov.b #0x2233, &N_TONY_220 ;# Move value 0x33 to memory @0x220
|
290 |
|
|
mov.b #0x4455, &N_TONY_223 ;# Move value 0x55 to memory @0x223
|
291 |
|
|
mov.b #0x6677, &N_TONY_224 ;# Move value 0x77 to memory @0x224
|
292 |
|
|
mov.b #0x8899, &N_TONY_227 ;# Move value 0x99 to memory @0x227
|
293 |
|
|
|
294 |
|
|
mov #0x5000, r15
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
/* ---------------------- TEST WHEN SOURCE IS x(Rn) ---------------- */
|
298 |
|
|
.set xRn_EDE_218, (__data_start+0x0018)
|
299 |
|
|
.set xRn_EDE_21B, (__data_start+0x001B)
|
300 |
|
|
.set xRn_EDE_21C, (__data_start+0x001C)
|
301 |
|
|
.set xRn_EDE_21F, (__data_start+0x001F)
|
302 |
|
|
|
303 |
|
|
.set xRn_TONY_220, 0x0220
|
304 |
|
|
.set xRn_TONY_223, 0x0223
|
305 |
|
|
.set xRn_TONY_224, 0x0224
|
306 |
|
|
.set xRn_TONY_227, 0x0227
|
307 |
|
|
|
308 |
|
|
|
309 |
|
|
mov #0x2233, &0x0210
|
310 |
|
|
mov #0x0200, r4
|
311 |
|
|
mov #0xffff, r5
|
312 |
|
|
mov.b 16(r4), r5 ;# r5 takes @0x0210 value: 0x0033
|
313 |
|
|
mov #0x4455, &0x0212
|
314 |
|
|
mov #0xffff, r6
|
315 |
|
|
mov.b 19(r4), r6 ;# r6 takes @0x0213 value: 0x0044
|
316 |
|
|
|
317 |
|
|
mov #0x1122, &0x0202
|
318 |
|
|
mov #0x3344, &0x0204
|
319 |
|
|
mov #0x5566, &0x0206
|
320 |
|
|
mov #0x7788, &0x0208
|
321 |
|
|
mov #0x0200, r7
|
322 |
|
|
mov #0xaaaa, &0x0210
|
323 |
|
|
mov #0x5555, &0x0212
|
324 |
|
|
mov #0x5a5a, &0x0214
|
325 |
|
|
mov #0xa5a5, &0x0216
|
326 |
|
|
|
327 |
|
|
mov #0x0200, r8
|
328 |
|
|
mov.b 2(r8), 16(r7) ;# Move memory @0x202 (0x22) to memory @0x210
|
329 |
|
|
mov.b 4(r8), 19(r7) ;# Move memory @0x204 (0x44) to memory @0x213
|
330 |
|
|
mov.b 7(r8), 20(r7) ;# Move memory @0x207 (0x55) to memory @0x214
|
331 |
|
|
mov.b 9(r8), 23(r7) ;# Move memory @0x209 (0x77) to memory @0x217
|
332 |
|
|
|
333 |
|
|
mov #0x99aa, &0x0202
|
334 |
|
|
mov #0xbbcc, &0x0204
|
335 |
|
|
mov #0xddee, &0x0206
|
336 |
|
|
mov #0xff11, &0x0208
|
337 |
|
|
mov #0x1111, &0x0218
|
338 |
|
|
mov #0xeeee, &0x021A
|
339 |
|
|
mov #0x1e1e, &0x021C
|
340 |
|
|
mov #0xe1e1, &0x021E
|
341 |
|
|
|
342 |
|
|
mov #0x0200, r8
|
343 |
|
|
mov.b 2(r8), xRn_EDE_218 ;# Move memory @0x202 (0xaa) to memory @0x218
|
344 |
|
|
mov.b 4(r8), xRn_EDE_21B ;# Move memory @0x204 (0xcc) to memory @0x21B
|
345 |
|
|
mov.b 7(r8), xRn_EDE_21C ;# Move memory @0x207 (0xdd) to memory @0x21C
|
346 |
|
|
mov.b 9(r8), xRn_EDE_21F ;# Move memory @0x209 (0xff) to memory @0x21F
|
347 |
|
|
|
348 |
|
|
mov #0x2233, &0x0202
|
349 |
|
|
mov #0x4455, &0x0204
|
350 |
|
|
mov #0x6677, &0x0206
|
351 |
|
|
mov #0x8899, &0x0208
|
352 |
|
|
mov #0x2222, &0x0220
|
353 |
|
|
mov #0xdddd, &0x0222
|
354 |
|
|
mov #0x2d2d, &0x0224
|
355 |
|
|
mov #0xd2d2, &0x0226
|
356 |
|
|
|
357 |
|
|
mov #0x0200, r8
|
358 |
|
|
mov.b 2(r8), &xRn_TONY_220 ;# Move memory @0x202 (0x33) to memory @0x220
|
359 |
|
|
mov.b 4(r8), &xRn_TONY_223 ;# Move memory @0x204 (0x55) to memory @0x223
|
360 |
|
|
mov.b 7(r8), &xRn_TONY_224 ;# Move memory @0x207 (0x66) to memory @0x224
|
361 |
|
|
mov.b 9(r8), &xRn_TONY_227 ;# Move memory @0x209 (0x88) to memory @0x227
|
362 |
|
|
|
363 |
|
|
mov #0x6000, r15
|
364 |
|
|
|
365 |
|
|
|
366 |
|
|
/* ---------------------- TEST WHEN SOURCE IS 'EDE' ---------------- */
|
367 |
|
|
.set EDE_EDE_202, (__data_start+0x0002)
|
368 |
|
|
.set EDE_EDE_204, (__data_start+0x0004)
|
369 |
|
|
.set EDE_EDE_207, (__data_start+0x0007)
|
370 |
|
|
.set EDE_EDE_209, (__data_start+0x0009)
|
371 |
|
|
.set EDE_EDE_210, (__data_start+0x0010)
|
372 |
|
|
.set EDE_EDE_213, (__data_start+0x0013)
|
373 |
|
|
.set EDE_EDE_218, (__data_start+0x0018)
|
374 |
|
|
.set EDE_EDE_21B, (__data_start+0x001B)
|
375 |
|
|
.set EDE_EDE_21C, (__data_start+0x001C)
|
376 |
|
|
.set EDE_EDE_21F, (__data_start+0x001F)
|
377 |
|
|
|
378 |
|
|
.set EDE_TONY_220, 0x0220
|
379 |
|
|
.set EDE_TONY_223, 0x0223
|
380 |
|
|
.set EDE_TONY_224, 0x0224
|
381 |
|
|
.set EDE_TONY_227, 0x0227
|
382 |
|
|
|
383 |
|
|
|
384 |
|
|
mov #0x2233, &0x0210
|
385 |
|
|
mov #0xffff, r5
|
386 |
|
|
mov.b EDE_EDE_210, r5 ;# r5 takes @0x0210 value: 0x0033
|
387 |
|
|
mov #0x4455, &0x0212
|
388 |
|
|
mov #0xffff, r6
|
389 |
|
|
mov.b EDE_EDE_213, r6 ;# r6 takes @0x0213 value: 0x0044
|
390 |
|
|
|
391 |
|
|
mov #0x1122, &0x0202
|
392 |
|
|
mov #0x3344, &0x0204
|
393 |
|
|
mov #0x5566, &0x0206
|
394 |
|
|
mov #0x7788, &0x0208
|
395 |
|
|
mov #0x0200, r7
|
396 |
|
|
mov #0xaaaa, &0x0210
|
397 |
|
|
mov #0x5555, &0x0212
|
398 |
|
|
mov #0x5a5a, &0x0214
|
399 |
|
|
mov #0xa5a5, &0x0216
|
400 |
|
|
|
401 |
|
|
mov.b EDE_EDE_202, 16(r7) ;# Move memory @0x202 (0x22) to memory @0x210
|
402 |
|
|
mov.b EDE_EDE_204, 19(r7) ;# Move memory @0x204 (0x44) to memory @0x213
|
403 |
|
|
mov.b EDE_EDE_207, 20(r7) ;# Move memory @0x207 (0x55) to memory @0x214
|
404 |
|
|
mov.b EDE_EDE_209, 23(r7) ;# Move memory @0x209 (0x77) to memory @0x217
|
405 |
|
|
|
406 |
|
|
mov #0x99aa, &0x0202
|
407 |
|
|
mov #0xbbcc, &0x0204
|
408 |
|
|
mov #0xddee, &0x0206
|
409 |
|
|
mov #0xff11, &0x0208
|
410 |
|
|
mov #0x1111, &0x0218
|
411 |
|
|
mov #0xeeee, &0x021A
|
412 |
|
|
mov #0x1e1e, &0x021C
|
413 |
|
|
mov #0xe1e1, &0x021E
|
414 |
|
|
|
415 |
|
|
mov.b EDE_EDE_202, EDE_EDE_218 ;# Move memory @0x202 (0xaa) to memory @0x218
|
416 |
|
|
mov.b EDE_EDE_204, EDE_EDE_21B ;# Move memory @0x204 (0xcc) to memory @0x21B
|
417 |
|
|
mov.b EDE_EDE_207, EDE_EDE_21C ;# Move memory @0x207 (0xdd) to memory @0x21C
|
418 |
|
|
mov.b EDE_EDE_209, EDE_EDE_21F ;# Move memory @0x209 (0xff) to memory @0x21F
|
419 |
|
|
|
420 |
|
|
mov #0x2233, &0x0202
|
421 |
|
|
mov #0x4455, &0x0204
|
422 |
|
|
mov #0x6677, &0x0206
|
423 |
|
|
mov #0x8899, &0x0208
|
424 |
|
|
mov #0x2222, &0x0220
|
425 |
|
|
mov #0xdddd, &0x0222
|
426 |
|
|
mov #0x2d2d, &0x0224
|
427 |
|
|
mov #0xd2d2, &0x0226
|
428 |
|
|
|
429 |
|
|
mov.b EDE_EDE_202, &EDE_TONY_220 ;# Move memory @0x202 (0x33) to memory @0x220
|
430 |
|
|
mov.b EDE_EDE_204, &EDE_TONY_223 ;# Move memory @0x204 (0x55) to memory @0x223
|
431 |
|
|
mov.b EDE_EDE_207, &EDE_TONY_224 ;# Move memory @0x207 (0x66) to memory @0x224
|
432 |
|
|
mov.b EDE_EDE_209, &EDE_TONY_227 ;# Move memory @0x209 (0x88) to memory @0x227
|
433 |
|
|
|
434 |
|
|
mov #0x7000, r15
|
435 |
|
|
|
436 |
|
|
|
437 |
|
|
|
438 |
|
|
/* ---------------------- TEST WHEN SOURCE IS '&EDE' --------------- */
|
439 |
|
|
.set aEDE_EDE_218, (__data_start+0x0018)
|
440 |
|
|
.set aEDE_EDE_21B, (__data_start+0x001B)
|
441 |
|
|
.set aEDE_EDE_21C, (__data_start+0x001C)
|
442 |
|
|
.set aEDE_EDE_21F, (__data_start+0x001F)
|
443 |
|
|
|
444 |
|
|
.set aEDE_TONY_220, 0x0220
|
445 |
|
|
.set aEDE_TONY_223, 0x0223
|
446 |
|
|
.set aEDE_TONY_224, 0x0224
|
447 |
|
|
.set aEDE_TONY_227, 0x0227
|
448 |
|
|
|
449 |
|
|
|
450 |
|
|
mov #0x2233, &0x0210
|
451 |
|
|
mov #0xffff, r5
|
452 |
|
|
mov.b &0x0210, r5 ;# r5 takes @0x0210 value: 0x0033
|
453 |
|
|
mov #0x4455, &0x0212
|
454 |
|
|
mov #0xffff, r6
|
455 |
|
|
mov.b &0x0213, r6 ;# r6 takes @0x0213 value: 0x0044
|
456 |
|
|
|
457 |
|
|
mov #0x1122, &0x0202
|
458 |
|
|
mov #0x3344, &0x0204
|
459 |
|
|
mov #0x5566, &0x0206
|
460 |
|
|
mov #0x7788, &0x0208
|
461 |
|
|
mov #0x0200, r7
|
462 |
|
|
mov #0xaaaa, &0x0210
|
463 |
|
|
mov #0x5555, &0x0212
|
464 |
|
|
mov #0x5a5a, &0x0214
|
465 |
|
|
mov #0xa5a5, &0x0216
|
466 |
|
|
|
467 |
|
|
mov.b &0x0202, 16(r7) ;# Move memory @0x202 (0x22) to memory @0x210
|
468 |
|
|
mov.b &0x0204, 19(r7) ;# Move memory @0x204 (0x44) to memory @0x213
|
469 |
|
|
mov.b &0x0207, 20(r7) ;# Move memory @0x207 (0x55) to memory @0x214
|
470 |
|
|
mov.b &0x0209, 23(r7) ;# Move memory @0x209 (0x77) to memory @0x217
|
471 |
|
|
|
472 |
|
|
mov #0x99aa, &0x0202
|
473 |
|
|
mov #0xbbcc, &0x0204
|
474 |
|
|
mov #0xddee, &0x0206
|
475 |
|
|
mov #0xff11, &0x0208
|
476 |
|
|
mov #0x1111, &0x0218
|
477 |
|
|
mov #0xeeee, &0x021A
|
478 |
|
|
mov #0x1e1e, &0x021C
|
479 |
|
|
mov #0xe1e1, &0x021E
|
480 |
|
|
|
481 |
|
|
mov.b &0x0202, aEDE_EDE_218 ;# Move memory @0x202 (0xaa) to memory @0x218
|
482 |
|
|
mov.b &0x0204, aEDE_EDE_21B ;# Move memory @0x204 (0xcc) to memory @0x21B
|
483 |
|
|
mov.b &0x0207, aEDE_EDE_21C ;# Move memory @0x207 (0xdd) to memory @0x21C
|
484 |
|
|
mov.b &0x0209, aEDE_EDE_21F ;# Move memory @0x209 (0xff) to memory @0x21F
|
485 |
|
|
|
486 |
|
|
mov #0x2233, &0x0202
|
487 |
|
|
mov #0x4455, &0x0204
|
488 |
|
|
mov #0x6677, &0x0206
|
489 |
|
|
mov #0x8899, &0x0208
|
490 |
|
|
mov #0x2222, &0x0220
|
491 |
|
|
mov #0xdddd, &0x0222
|
492 |
|
|
mov #0x2d2d, &0x0224
|
493 |
|
|
mov #0xd2d2, &0x0226
|
494 |
|
|
|
495 |
|
|
mov.b &0x0202, &aEDE_TONY_220 ;# Move memory @0x202 (0x33) to memory @0x220
|
496 |
|
|
mov.b &0x0204, &aEDE_TONY_223 ;# Move memory @0x204 (0x55) to memory @0x223
|
497 |
|
|
mov.b &0x0207, &aEDE_TONY_224 ;# Move memory @0x207 (0x66) to memory @0x224
|
498 |
|
|
mov.b &0x0209, &aEDE_TONY_227 ;# Move memory @0x209 (0x88) to memory @0x227
|
499 |
|
|
|
500 |
|
|
mov #0x8000, r15
|
501 |
|
|
|
502 |
|
|
|
503 |
|
|
/* ---------------------- TEST WHEN SOURCE IS CONSTANT ------------- */
|
504 |
|
|
.set CONSTL_EDE0, (__data_start+0x0030)
|
505 |
|
|
.set CONSTL_EDE1, (__data_start+0x0032)
|
506 |
|
|
.set CONSTL_EDE2, (__data_start+0x0034)
|
507 |
|
|
.set CONSTL_EDE4, (__data_start+0x0036)
|
508 |
|
|
.set CONSTL_EDE8, (__data_start+0x0038)
|
509 |
|
|
.set CONSTL_EDEm1, (__data_start+0x003A)
|
510 |
|
|
.set CONSTH_EDE0, (__data_start+0x003D)
|
511 |
|
|
.set CONSTH_EDE1, (__data_start+0x003F)
|
512 |
|
|
.set CONSTH_EDE2, (__data_start+0x0041)
|
513 |
|
|
.set CONSTH_EDE4, (__data_start+0x0043)
|
514 |
|
|
.set CONSTH_EDE8, (__data_start+0x0045)
|
515 |
|
|
.set CONSTH_EDEm1, (__data_start+0x0047)
|
516 |
|
|
|
517 |
|
|
.set CONSTL_TONY0, 0x0250
|
518 |
|
|
.set CONSTL_TONY1, 0x0252
|
519 |
|
|
.set CONSTL_TONY2, 0x0254
|
520 |
|
|
.set CONSTL_TONY4, 0x0256
|
521 |
|
|
.set CONSTL_TONY8, 0x0258
|
522 |
|
|
.set CONSTL_TONYm1, 0x025A
|
523 |
|
|
.set CONSTH_TONY0, 0x025D
|
524 |
|
|
.set CONSTH_TONY1, 0x025F
|
525 |
|
|
.set CONSTH_TONY2, 0x0261
|
526 |
|
|
.set CONSTH_TONY4, 0x0263
|
527 |
|
|
.set CONSTH_TONY8, 0x0265
|
528 |
|
|
.set CONSTH_TONYm1, 0x0267
|
529 |
|
|
|
530 |
|
|
|
531 |
|
|
mov #0x4444, r4 ;# Initialize registers
|
532 |
|
|
mov #0x5555, r5
|
533 |
|
|
mov #0x6666, r6
|
534 |
|
|
mov #0x7777, r7
|
535 |
|
|
mov #0x8888, r8
|
536 |
|
|
mov #0x9999, r9
|
537 |
|
|
|
538 |
|
|
mov.b #0x0000, r4 ;# Write +0 to R4
|
539 |
|
|
mov.b #0x0001, r5 ;# Write +1 to R5
|
540 |
|
|
mov.b #0x0002, r6 ;# Write +2 to R6
|
541 |
|
|
mov.b #0x0004, r7 ;# Write +4 to R7
|
542 |
|
|
mov.b #0x0008, r8 ;# Write +8 to R8
|
543 |
|
|
mov.b #0xffff, r9 ;# Write -1 to R9
|
544 |
|
|
|
545 |
|
|
mov #0x4444, &0x0210 ;# Initialize Memory
|
546 |
|
|
mov #0x5555, &0x0212
|
547 |
|
|
mov #0x6666, &0x0214
|
548 |
|
|
mov #0x7777, &0x0216
|
549 |
|
|
mov #0x3535, &0x0218
|
550 |
|
|
mov #0x9999, &0x021A
|
551 |
|
|
mov #0xaaaa, &0x021C
|
552 |
|
|
mov #0xbbbb, &0x021E
|
553 |
|
|
mov #0xcccc, &0x0220
|
554 |
|
|
mov #0xdddd, &0x0222
|
555 |
|
|
mov #0xeeee, &0x0224
|
556 |
|
|
mov #0x3333, &0x0226
|
557 |
|
|
|
558 |
|
|
mov #0x0202, r10
|
559 |
|
|
mov #0x1234, r11
|
560 |
|
|
mov.b #0x0000, 14(r10) ;# Move +0 to memory @0x210
|
561 |
|
|
mov.b #0x0001, 16(r10) ;# Move +1 to memory @0x212
|
562 |
|
|
mov.b #0x0002, 18(r10) ;# Move +2 to memory @0x214
|
563 |
|
|
mov.b #0x0004, 20(r10) ;# Move +4 to memory @0x216
|
564 |
|
|
mov.b #0x0008, 22(r10) ;# Move +8 to memory @0x218
|
565 |
|
|
mov.b #0xffff, 24(r10) ;# Move -1 to memory @0x21A
|
566 |
|
|
mov.b #0x0000, 27(r10) ;# Move +0 to memory @0x21D
|
567 |
|
|
mov.b #0x0001, 29(r10) ;# Move +1 to memory @0x21F
|
568 |
|
|
mov.b #0x0002, 31(r10) ;# Move +2 to memory @0x221
|
569 |
|
|
mov.b #0x0004, 33(r10) ;# Move +4 to memory @0x223
|
570 |
|
|
mov.b #0x0008, 35(r10) ;# Move +8 to memory @0x225
|
571 |
|
|
mov.b #0xffff, 37(r10) ;# Move -1 to memory @0x227
|
572 |
|
|
|
573 |
|
|
mov #0x4444, &0x0230 ;# Initialize Memory
|
574 |
|
|
mov #0x5555, &0x0232
|
575 |
|
|
mov #0x6666, &0x0234
|
576 |
|
|
mov #0x7777, &0x0236
|
577 |
|
|
mov #0x3535, &0x0238
|
578 |
|
|
mov #0x9999, &0x023A
|
579 |
|
|
mov #0xaaaa, &0x023C
|
580 |
|
|
mov #0xbbbb, &0x023E
|
581 |
|
|
mov #0xcccc, &0x0240
|
582 |
|
|
mov #0xdddd, &0x0242
|
583 |
|
|
mov #0xeeee, &0x0244
|
584 |
|
|
mov #0x3333, &0x0246
|
585 |
|
|
|
586 |
|
|
mov.b #0x0000, CONSTL_EDE0 ;# Move +0 to memory @0x230
|
587 |
|
|
mov.b #0x0001, CONSTL_EDE1 ;# Move +1 to memory @0x232
|
588 |
|
|
mov.b #0x0002, CONSTL_EDE2 ;# Move +2 to memory @0x234
|
589 |
|
|
mov.b #0x0004, CONSTL_EDE4 ;# Move +4 to memory @0x236
|
590 |
|
|
mov.b #0x0008, CONSTL_EDE8 ;# Move +8 to memory @0x238
|
591 |
|
|
mov.b #0xffff, CONSTL_EDEm1 ;# Move -1 to memory @0x23A
|
592 |
|
|
mov.b #0x0000, CONSTH_EDE0 ;# Move +0 to memory @0x23D
|
593 |
|
|
mov.b #0x0001, CONSTH_EDE1 ;# Move +1 to memory @0x23F
|
594 |
|
|
mov.b #0x0002, CONSTH_EDE2 ;# Move +2 to memory @0x241
|
595 |
|
|
mov.b #0x0004, CONSTH_EDE4 ;# Move +4 to memory @0x243
|
596 |
|
|
mov.b #0x0008, CONSTH_EDE8 ;# Move +8 to memory @0x245
|
597 |
|
|
mov.b #0xffff, CONSTH_EDEm1 ;# Move -1 to memory @0x247
|
598 |
|
|
|
599 |
|
|
|
600 |
|
|
#
|
601 |
|
|
# NOTE: The following section would not fit in the smallest ROM
|
602 |
|
|
# configuration. Therefore, it is executed at the end of
|
603 |
|
|
# the "two-op_mov.s43" pattern.
|
604 |
|
|
#
|
605 |
|
|
|
606 |
|
|
# mov #0x4444, &0x0250 ;# Initialize Memory
|
607 |
|
|
# mov #0x5555, &0x0252
|
608 |
|
|
# mov #0x6666, &0x0254
|
609 |
|
|
# mov #0x7777, &0x0256
|
610 |
|
|
# mov #0x3535, &0x0258
|
611 |
|
|
# mov #0x9999, &0x025A
|
612 |
|
|
# mov #0xaaaa, &0x025C
|
613 |
|
|
# mov #0xbbbb, &0x025E
|
614 |
|
|
# mov #0xcccc, &0x0260
|
615 |
|
|
# mov #0xdddd, &0x0262
|
616 |
|
|
# mov #0xeeee, &0x0264
|
617 |
|
|
# mov #0x3333, &0x0266
|
618 |
|
|
|
619 |
|
|
# mov.b #0x0000, &CONSTL_TONY0 ;# Move +0 to memory @0x250
|
620 |
|
|
# mov.b #0x0001, &CONSTL_TONY1 ;# Move +1 to memory @0x252
|
621 |
|
|
# mov.b #0x0002, &CONSTL_TONY2 ;# Move +2 to memory @0x254
|
622 |
|
|
# mov.b #0x0004, &CONSTL_TONY4 ;# Move +4 to memory @0x256
|
623 |
|
|
# mov.b #0x0008, &CONSTL_TONY8 ;# Move +8 to memory @0x258
|
624 |
|
|
# mov.b #0xffff, &CONSTL_TONYm1 ;# Move -1 to memory @0x25A
|
625 |
|
|
# mov.b #0x0000, &CONSTH_TONY0 ;# Move +0 to memory @0x25D
|
626 |
|
|
# mov.b #0x0001, &CONSTH_TONY1 ;# Move +1 to memory @0x25F
|
627 |
|
|
# mov.b #0x0002, &CONSTH_TONY2 ;# Move +2 to memory @0x261
|
628 |
|
|
# mov.b #0x0004, &CONSTH_TONY4 ;# Move +4 to memory @0x263
|
629 |
|
|
# mov.b #0x0008, &CONSTH_TONY8 ;# Move +8 to memory @0x265
|
630 |
|
|
# mov.b #0xffff, &CONSTH_TONYm1 ;# Move -1 to memory @0x267
|
631 |
|
|
|
632 |
|
|
mov #0x9000, r15
|
633 |
|
|
|
634 |
|
|
|
635 |
|
|
/* ---------------------- END OF TEST --------------- */
|
636 |
|
|
end_of_test:
|
637 |
|
|
nop
|
638 |
|
|
br #0xffff
|
639 |
|
|
|
640 |
|
|
|
641 |
|
|
|
642 |
|
|
/* ---------------------- INTERRUPT VECTORS --------------- */
|
643 |
|
|
|
644 |
|
|
.section .vectors, "a"
|
645 |
|
|
.word end_of_test ; Interrupt 0 (lowest priority)
|
646 |
|
|
.word end_of_test ; Interrupt 1
|
647 |
|
|
.word end_of_test ; Interrupt 2
|
648 |
|
|
.word end_of_test ; Interrupt 3
|
649 |
|
|
.word end_of_test ; Interrupt 4
|
650 |
|
|
.word end_of_test ; Interrupt 5
|
651 |
|
|
.word end_of_test ; Interrupt 6
|
652 |
|
|
.word end_of_test ; Interrupt 7
|
653 |
|
|
.word end_of_test ; Interrupt 8
|
654 |
|
|
.word end_of_test ; Interrupt 9
|
655 |
|
|
.word end_of_test ; Interrupt 10 Watchdog timer
|
656 |
|
|
.word end_of_test ; Interrupt 11
|
657 |
|
|
.word end_of_test ; Interrupt 12
|
658 |
|
|
.word end_of_test ; Interrupt 13
|
659 |
|
|
.word end_of_test ; Interrupt 14 NMI
|
660 |
|
|
.word main ; Interrupt 15 (highest priority) RESET
|