OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src/] [two-op_mov-b.s43] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.