URL
https://opencores.org/ocsvn/openmsp430/openmsp430/trunk
Subversion Repositories openmsp430
[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src/] [two-op_add-b.s43] - Rev 81
Go to most recent revision | Compare with Previous | Blame | View Log
/*===========================================================================*/
/* Copyright (C) 2001 Authors */
/* */
/* This source file may be used and distributed without restriction provided */
/* that this copyright statement is not removed from the file and that any */
/* derivative work contains the original copyright notice and the associated */
/* disclaimer. */
/* */
/* This source file is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU Lesser General Public License as published */
/* by the Free Software Foundation; either version 2.1 of the License, or */
/* (at your option) any later version. */
/* */
/* This source is distributed in the hope that it will be useful, but WITHOUT*/
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
/* License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with this source; if not, write to the Free Software Foundation, */
/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/*===========================================================================*/
/* TWO-OPERAND ARITHMETIC: ADD.B INSTRUCTION */
/*---------------------------------------------------------------------------*/
/* Test the ADD.B instruction with all addressing modes */
/* */
/* Author(s): */
/* - Olivier Girard, olgirard@gmail.com */
/* */
/*---------------------------------------------------------------------------*/
/* $Rev: 19 $ */
/* $LastChangedBy: olivier.girard $ */
/* $LastChangedDate: 2009-08-04 23:47:15 +0200 (Tue, 04 Aug 2009) $ */
/*===========================================================================*/
.global main
main:
/* ---------------------- INITIALIZE REGISTERS --------------------- */
mov #0x2222, r2
mov #0x3333, r3
mov #0x4444, r4
mov #0x5555, r5
mov #0x6666, r6
mov #0x7777, r7
mov #0x8888, r8
mov #0x9999, r9
mov #0xaaaa, r10
mov #0xbbbb, r11
mov #0xcccc, r12
mov #0xdddd, r13
mov #0xeeee, r14
mov #0x1000, r15
/* ---------------------- TEST WHEN SOURCE IS Rn ------------------- */
.set Rn_EDEL, (__data_start+0x0014)
.set Rn_EDEH, (__data_start+0x0017)
.set Rn_TONYL, 0x0218
.set Rn_TONYH, 0x021B
mov #0x4455, r4
mov #0x6677, r5
add.b r5, r4 ;# Write 0x55+0x77=0x00cc to r4
mov #0x0200, r5
mov #0xaabb, &0x210
mov #0x1234, r6
add.b r6, 16(r5) ;# Write 0xbb+0x34=0xef to memory @0x0210
mov #0x5566, &0x212
mov #0x5678, r6
add.b r6, 19(r5) ;# Write 0x55+0x78=0xcd to memory @0x0213
mov #0x1122, &0x214
mov #0xabcd, r7
add.b r7, Rn_EDEL ;# Write 0x22+0xcd=0xef to memory @0x0214
mov #0x99aa, &0x216
mov #0xef12, r7
add.b r7, Rn_EDEH ;# Write 0x99+0x12=0xab to memory @0x0217
mov #0x7788, &0x218
mov #0x1f2e, r8
add.b r8, &Rn_TONYL ;# Write 0x88+0x2e=0xb6 to memory @0x0218
mov #0x3344, &0x21A
mov #0x3d4c, r8
add.b r8, &Rn_TONYH ;# Write 0x33+0x4c=0x7f to memory @0x021B
mov #0x2000, r15
/* ---------------------- TEST WHEN SOURCE IS @Rn ------------------ */
.set aRn_EDE_218, (__data_start+0x0018)
.set aRn_EDE_21B, (__data_start+0x001B)
.set aRn_EDE_21C, (__data_start+0x001C)
.set aRn_EDE_21F, (__data_start+0x001F)
.set aRn_TONY_220, 0x0220
.set aRn_TONY_223, 0x0223
.set aRn_TONY_224, 0x0224
.set aRn_TONY_227, 0x0227
mov #0x2233, &0x0210
mov #0x0210, r4
mov #0xeeff, r5
add.b @r4, r5 ;# Write 0x33+0xff=0x32 to r5
mov #0x4455, &0x0212
mov #0x0213, r4
mov #0xccdd, r6
add.b @r4, r6 ;# Write 0x44+0xdd=0x21 to r6
mov #0x1122, &0x0200
mov #0x3344, &0x0202
mov #0x5566, &0x0204
mov #0x7788, &0x0206
mov #0x0200, r7
mov #0x55aa, &0x0210
mov #0x66bb, &0x0212
mov #0x56ab, &0x0214
mov #0x65ba, &0x0216
mov #0x0200, r8
add.b @r8, 16(r7) ;# Write 0x22+0xaa=0xcc to memory @0x210
mov #0x0202, r8
add.b @r8, 19(r7) ;# Write 0x44+0x66=0xaa to memory @0x213
mov #0x0205, r8
add.b @r8, 20(r7) ;# Write 0x55+0xab=0x00 to memory @0x214
mov #0x0207, r8
add.b @r8, 23(r7) ;# Write 0x77+0x65=0xdc to memory @0x217
mov #0x99aa, &0x0200
mov #0xbbcc, &0x0202
mov #0xddee, &0x0204
mov #0xff11, &0x0206
mov #0x11ee, &0x0218
mov #0x22dd, &0x021A
mov #0x1de2, &0x021C
mov #0xd12e, &0x021E
mov #0x0200, r8
add.b @r8, aRn_EDE_218 ;# Write 0xaa+0xee=0x98 to memory @0x218
mov #0x0202, r8
add.b @r8, aRn_EDE_21B ;# Write 0xcc+0x22=0xee to memory @0x21B
mov #0x0205, r8
add.b @r8, aRn_EDE_21C ;# Write 0xdd+0xe2=0xbf to memory @0x21C
mov #0x0207, r8
add.b @r8, aRn_EDE_21F ;# Write 0xff+0xd1=0xd0 to memory @0x21F
mov #0x2233, &0x0200
mov #0x4455, &0x0202
mov #0x6677, &0x0204
mov #0x8899, &0x0206
mov #0x22dd, &0x0220
mov #0x33cc, &0x0222
mov #0x2cd3, &0x0224
mov #0xc23d, &0x0226
mov #0x0200, r8
add.b @r8, &aRn_TONY_220 ;# Write 0x33+0xdd=0x10 to memory @0x220
mov #0x0202, r8
add.b @r8, &aRn_TONY_223 ;# Write 0x55+0x33=0x88 to memory @0x223
mov #0x0205, r8
add.b @r8, &aRn_TONY_224 ;# Write 0x66+0xd3=0x39 to memory @0x224
mov #0x0207, r8
add.b @r8, &aRn_TONY_227 ;# Write 0x88+0xc2=0x4a to memory @0x227
mov #0x3000, r15
/* ---------------------- TEST WHEN SOURCE IS @Rn+ ----------------- */
.set aRni_EDE_218, (__data_start+0x0018)
.set aRni_EDE_21B, (__data_start+0x001B)
.set aRni_EDE_21C, (__data_start+0x001C)
.set aRni_EDE_21F, (__data_start+0x001F)
.set aRni_TONY_220, 0x0220
.set aRni_TONY_223, 0x0223
.set aRni_TONY_224, 0x0224
.set aRni_TONY_227, 0x0227
mov #0x2233, &0x0210
mov #0x0210, r4
mov #0xf11f, r5
add.b @r4+, r5 ;# Write 0x33+0x1f=0x52 to r5
mov #0x4455, &0x0212
mov #0x0213, r6
mov #0x1ff1, r7
add.b @r6+, r7 ;# Write 0x44+0xf1=0x35 to r7
mov #0x1122, &0x0200
mov #0x3344, &0x0202
mov #0x5566, &0x0204
mov #0x7788, &0x0206
mov #0x0200, r8
mov #0xaabb, &0x0210
mov #0x5566, &0x0212
mov #0x5a6b, &0x0214
mov #0xa5b6, &0x0216
mov #0x0200, r9
add.b @r9+, 16(r8) ;# Write 0x22+0xbb=0xdd to memory @0x210
mov.b @r9+, r10
add.b @r9+, 19(r8) ;# Write 0x44+0x55=0x99 to memory @0x213
mov @r9+, r10
add.b @r9+, 20(r8) ;# Write 0x55+0x6b=0xc0 to memory @0x214
mov.b @r9+, r10
add.b @r9+, 23(r8) ;# Write 0x77+0xa5=0x1c to memory @0x217
mov #0x99aa, &0x0200
mov #0xbbcc, &0x0202
mov #0xddee, &0x0204
mov #0xff11, &0x0206
mov #0x1122, &0x0218
mov #0xeeff, &0x021A
mov #0x1e2f, &0x021C
mov #0xe1f2, &0x021E
mov #0x0200, r10
add.b @r10+, aRni_EDE_218 ;# Write 0xaa+0x22=0xcc to memory @0x218
mov.b @r10+, r11
add.b @r10+, aRni_EDE_21B ;# Write 0xcc+0xee=0xba to memory @0x21B
mov @r10+, r11
add.b @r10+, aRni_EDE_21C ;# Write 0xdd+0x2f=0x0c to memory @0x21C
mov.b @r10+, r11
add.b @r10+, aRni_EDE_21F ;# Write 0xff+0xe1=0xe0 to memory @0x21F
mov #0x2233, &0x0200
mov #0x4455, &0x0202
mov #0x6677, &0x0204
mov #0x8899, &0x0206
mov #0x5566, &0x0220
mov #0xccdd, &0x0222
mov #0x5c6d, &0x0224
mov #0xc5d6, &0x0226
mov #0x0200, r11
add.b @r11+, &aRni_TONY_220 ;# Write 0x33+0x66=0x99 to memory @0x220
mov.b @r11+, r12
add.b @r11+, &aRni_TONY_223 ;# Write 0x55+0xcc=0x21 to memory @0x223
mov @r11+, r12
add.b @r11+, &aRni_TONY_224 ;# Write 0x66+0x6d=0xd3 to memory @0x224
mov.b @r11+, r12
add.b @r11+, &aRni_TONY_227 ;# Write 0x88+0xc5=0x4d to memory @0x227
mov #0x4000, r15
/* ---------------------- TEST WHEN SOURCE IS #N ------------------- */
.set N_EDE_218, (__data_start+0x0018)
.set N_EDE_21B, (__data_start+0x001B)
.set N_EDE_21C, (__data_start+0x001C)
.set N_EDE_21F, (__data_start+0x001F)
.set N_TONY_220, 0x0220
.set N_TONY_223, 0x0223
.set N_TONY_224, 0x0224
.set N_TONY_227, 0x0227
mov #0xac56, r4
add.b #0x1234, r4 ;# Write 0x56+0x34=0x8a to r4
mov #0x0200, r5
mov #0xaa99, &0x0210
mov #0x5544, &0x0212
mov #0xa954, &0x0214
mov #0x495a, &0x0216
add.b #0x1122, 16(r5) ;# Write 0x22+0x99=0xbb to memory @0x210
add.b #0x3344, 19(r5) ;# Write 0x44+0x55=0x99 to memory @0x213
add.b #0x5566, 20(r5) ;# Write 0x66+0x54=0xba to memory @0x214
add.b #0x7788, 23(r5) ;# Write 0x88+0x49=0xd1 to memory @0x217
mov #0x1122, &0x0218
mov #0xeecc, &0x021A
mov #0x1e2c, &0x021C
mov #0xe1c2, &0x021E
add.b #0x99aa, N_EDE_218 ;# Write 0xaa+0x22=0xcc to memory @0x218
add.b #0xbbcc, N_EDE_21B ;# Write 0xcc+0xee=0xba to memory @0x21B
add.b #0xddee, N_EDE_21C ;# Write 0xee+0x2c=0x1a to memory @0x21C
add.b #0xff11, N_EDE_21F ;# Write 0x11+0xe1=0xf2 to memory @0x21F
mov #0xaa88, &0x0220
mov #0x22ee, &0x0222
mov #0xa28e, &0x0224
mov #0x2ae8, &0x0226
add.b #0x2233, &N_TONY_220 ;# Write 0x33+0x88=0xbb to memory @0x220
add.b #0x4455, &N_TONY_223 ;# Write 0x55+0x22=0x77 to memory @0x223
add.b #0x6677, &N_TONY_224 ;# Write 0x77+0x8e=0x05 to memory @0x224
add.b #0x8899, &N_TONY_227 ;# Write 0x99+0x2a=0xc3 to memory @0x227
mov #0x5000, r15
/* ---------------------- TEST WHEN SOURCE IS x(Rn) ---------------- */
.set xRn_EDE_218, (__data_start+0x0018)
.set xRn_EDE_21B, (__data_start+0x001B)
.set xRn_EDE_21C, (__data_start+0x001C)
.set xRn_EDE_21F, (__data_start+0x001F)
.set xRn_TONY_220, 0x0220
.set xRn_TONY_223, 0x0223
.set xRn_TONY_224, 0x0224
.set xRn_TONY_227, 0x0227
mov #0x2233, &0x0210
mov #0x0200, r4
mov #0xba98, r5
add.b 16(r4), r5 ;# Write 0x33+0x98=0xcb to r5
mov #0x4455, &0x0212
mov #0x7654, r6
add.b 19(r4), r6 ;# Write 0x44+0x54=0x98 to r6
mov #0x1122, &0x0202
mov #0x3344, &0x0204
mov #0x5566, &0x0206
mov #0x7788, &0x0208
mov #0x0200, r7
mov #0xaa11, &0x0210
mov #0x2255, &0x0212
mov #0xa215, &0x0214
mov #0x2a51, &0x0216
mov #0x0200, r8
add.b 2(r8), 16(r7) ;# Write 0x22+0x11=0x33 to memory @0x210
add.b 4(r8), 19(r7) ;# Write 0x44+0x22=0x66 to memory @0x213
add.b 7(r8), 20(r7) ;# Write 0x55+0x15=0x6a to memory @0x214
add.b 9(r8), 23(r7) ;# Write 0x77+0x2a=0xa1 to memory @0x217
mov #0x99aa, &0x0202
mov #0xbbcc, &0x0204
mov #0xddee, &0x0206
mov #0xff11, &0x0208
mov #0x3344, &0x0218
mov #0x77cc, &0x021A
mov #0x374c, &0x021C
mov #0x73c4, &0x021E
mov #0x0200, r8
add.b 2(r8), xRn_EDE_218 ;# Write 0xaa+0x44=0xee to memory @0x218
add.b 4(r8), xRn_EDE_21B ;# Write 0xcc+0x77=0x43 to memory @0x21B
add.b 7(r8), xRn_EDE_21C ;# Write 0xdd+0x4c=0x29 to memory @0x21C
add.b 9(r8), xRn_EDE_21F ;# Write 0xff+0x73=0x72 to memory @0x21F
mov #0x2233, &0x0202
mov #0x4455, &0x0204
mov #0x6677, &0x0206
mov #0x8899, &0x0208
mov #0x0011, &0x0220
mov #0xddcc, &0x0222
mov #0x0d1c, &0x0224
mov #0xd0c1, &0x0226
mov #0x0200, r8
add.b 2(r8), &xRn_TONY_220 ;# Write 0x33+0x11=0x44 to memory @0x220
add.b 4(r8), &xRn_TONY_223 ;# Write 0x55+0xdd=0x32 to memory @0x223
add.b 7(r8), &xRn_TONY_224 ;# Write 0x66+0x1c=0x82 to memory @0x224
add.b 9(r8), &xRn_TONY_227 ;# Write 0x88+0xd0=0x58 to memory @0x227
mov #0x6000, r15
/* ---------------------- TEST WHEN SOURCE IS 'EDE' ---------------- */
.set EDE_EDE_202, (__data_start+0x0002)
.set EDE_EDE_204, (__data_start+0x0004)
.set EDE_EDE_207, (__data_start+0x0007)
.set EDE_EDE_209, (__data_start+0x0009)
.set EDE_EDE_210, (__data_start+0x0010)
.set EDE_EDE_213, (__data_start+0x0013)
.set EDE_EDE_218, (__data_start+0x0018)
.set EDE_EDE_21B, (__data_start+0x001B)
.set EDE_EDE_21C, (__data_start+0x001C)
.set EDE_EDE_21F, (__data_start+0x001F)
.set EDE_TONY_220, 0x0220
.set EDE_TONY_223, 0x0223
.set EDE_TONY_224, 0x0224
.set EDE_TONY_227, 0x0227
mov #0x2233, &0x0210
mov #0xcb43, r5
add.b EDE_EDE_210, r5 ;# Write 0x33+0x43=0x76 to r5
mov #0x4455, &0x0212
mov #0x32a5, r6
add.b EDE_EDE_213, r6 ;# Write 0x44+0xa5=0xe9 to r6
mov #0x1122, &0x0202
mov #0x3344, &0x0204
mov #0x5566, &0x0206
mov #0x7788, &0x0208
mov #0x0200, r7
mov #0xaabb, &0x0210
mov #0x6655, &0x0212
mov #0xa6b5, &0x0214
mov #0x6a5b, &0x0216
add.b EDE_EDE_202, 16(r7) ;# Write 0x22+0xbb=0xdd to memory @0x210
add.b EDE_EDE_204, 19(r7) ;# Write 0x44+0x66=0xaa to memory @0x213
add.b EDE_EDE_207, 20(r7) ;# Write 0x55+0xb5=0x0a to memory @0x214
add.b EDE_EDE_209, 23(r7) ;# Write 0x77+0x6a=0xe1 to memory @0x217
mov #0x99aa, &0x0202
mov #0xbbcc, &0x0204
mov #0xddee, &0x0206
mov #0xff11, &0x0208
mov #0x1122, &0x0218
mov #0xeeff, &0x021A
mov #0x1e2f, &0x021C
mov #0xe1f2, &0x021E
add.b EDE_EDE_202, EDE_EDE_218 ;# Write 0xaa+0x22=0xcc to memory @0x218
add.b EDE_EDE_204, EDE_EDE_21B ;# Write 0xcc+0xee=0xba to memory @0x21B
add.b EDE_EDE_207, EDE_EDE_21C ;# Write 0xdd+0x2f=0x0c to memory @0x21C
add.b EDE_EDE_209, EDE_EDE_21F ;# Write 0xff+0xe1=0xe0 to memory @0x21F
mov #0x2233, &0x0202
mov #0x4455, &0x0204
mov #0x6677, &0x0206
mov #0x8899, &0x0208
mov #0x1107, &0x0220
mov #0xccdd, &0x0222
mov #0x2c3d, &0x0224
mov #0xc2d3, &0x0226
add.b EDE_EDE_202, &EDE_TONY_220 ;# Write 0x33+0x07=0x3a to memory @0x220
add.b EDE_EDE_204, &EDE_TONY_223 ;# Write 0x55+0xcc=0x21 to memory @0x223
add.b EDE_EDE_207, &EDE_TONY_224 ;# Write 0x66+0x3d=0xa3 to memory @0x224
add.b EDE_EDE_209, &EDE_TONY_227 ;# Write 0x88+0xc2=0x4a to memory @0x227
mov #0x7000, r15
/* ---------------------- TEST WHEN SOURCE IS '&EDE' --------------- */
.set aEDE_EDE_218, (__data_start+0x0018)
.set aEDE_EDE_21B, (__data_start+0x001B)
.set aEDE_EDE_21C, (__data_start+0x001C)
.set aEDE_EDE_21F, (__data_start+0x001F)
.set aEDE_TONY_220, 0x0220
.set aEDE_TONY_223, 0x0223
.set aEDE_TONY_224, 0x0224
.set aEDE_TONY_227, 0x0227
mov #0x2233, &0x0210
mov #0x6677, r5
add.b &0x0210, r5 ;# Write 0x33+0x77=0xaa to r5
mov #0x4455, &0x0212
mov #0x8899, r6
add.b &0x0213, r6 ;# Write 0x44+0x99=0xdd to r6
mov #0x1122, &0x0202
mov #0x3344, &0x0204
mov #0x5566, &0x0206
mov #0x7788, &0x0208
mov #0x0200, r7
mov #0xaabb, &0x0210
mov #0xccdd, &0x0212
mov #0xacbd, &0x0214
mov #0xcadb, &0x0216
add.b &0x0202, 16(r7) ;# Write 0x22+0xbb=0xdd to memory @0x210
add.b &0x0204, 19(r7) ;# Write 0x44+0xcc=0x10 to memory @0x213
add.b &0x0207, 20(r7) ;# Write 0x55+0xbd=0x12 to memory @0x214
add.b &0x0209, 23(r7) ;# Write 0x77+0xca=0x41 to memory @0x217
mov #0x99aa, &0x0202
mov #0xbbcc, &0x0204
mov #0xddee, &0x0206
mov #0xff11, &0x0208
mov #0x1122, &0x0218
mov #0x6677, &0x021A
mov #0x1627, &0x021C
mov #0x6172, &0x021E
add.b &0x0202, aEDE_EDE_218 ;# Write 0xaa+0x22=0xcc to memory @0x218
add.b &0x0204, aEDE_EDE_21B ;# Write 0xcc+0x66=0x32 to memory @0x21B
add.b &0x0207, aEDE_EDE_21C ;# Write 0xdd+0x27=0x04 to memory @0x21C
add.b &0x0209, aEDE_EDE_21F ;# Write 0xff+0x61=0x60 to memory @0x21F
mov #0x2233, &0x0202
mov #0x4455, &0x0204
mov #0x6677, &0x0206
mov #0x8899, &0x0208
mov #0xaabb, &0x0220
mov #0xddee, &0x0222
mov #0xadbe, &0x0224
mov #0xdaeb, &0x0226
add.b &0x0202, &aEDE_TONY_220 ;# Write 0x33+0xbb=0xee to memory @0x220
add.b &0x0204, &aEDE_TONY_223 ;# Write 0x55+0xdd=0x32 to memory @0x223
add.b &0x0207, &aEDE_TONY_224 ;# Write 0x66+0xbe=0x24 to memory @0x224
add.b &0x0209, &aEDE_TONY_227 ;# Write 0x88+0xda=0x62 to memory @0x227
mov #0x8000, r15
/* ---------------------- TEST WHEN SOURCE IS CONSTANT ------------- */
.set CONSTL_EDE0, (__data_start+0x0030)
.set CONSTL_EDE1, (__data_start+0x0032)
.set CONSTL_EDE2, (__data_start+0x0034)
.set CONSTL_EDE4, (__data_start+0x0036)
.set CONSTL_EDE8, (__data_start+0x0038)
.set CONSTL_EDEm1, (__data_start+0x003A)
.set CONSTH_EDE0, (__data_start+0x003D)
.set CONSTH_EDE1, (__data_start+0x003F)
.set CONSTH_EDE2, (__data_start+0x0041)
.set CONSTH_EDE4, (__data_start+0x0043)
.set CONSTH_EDE8, (__data_start+0x0045)
.set CONSTH_EDEm1, (__data_start+0x0047)
.set CONSTL_TONY0, 0x0250
.set CONSTL_TONY1, 0x0252
.set CONSTL_TONY2, 0x0254
.set CONSTL_TONY4, 0x0256
.set CONSTL_TONY8, 0x0258
.set CONSTL_TONYm1, 0x025A
.set CONSTH_TONY0, 0x025D
.set CONSTH_TONY1, 0x025F
.set CONSTH_TONY2, 0x0261
.set CONSTH_TONY4, 0x0263
.set CONSTH_TONY8, 0x0265
.set CONSTH_TONYm1, 0x0267
mov #0xaa44, r4 ;# Initialize registers
mov #0xaa55, r5
mov #0xaa66, r6
mov #0xaa77, r7
mov #0xaa88, r8
mov #0xaa99, r9
add.b #0x0000, r4 ;# Write 0x44+0 to R4
add.b #0x0001, r5 ;# Write 0x55+1 to R5
add.b #0x0002, r6 ;# Write 0x66+2 to R6
add.b #0x0004, r7 ;# Write 0x77+4 to R7
add.b #0x0008, r8 ;# Write 0x88+8 to R8
add.b #0xffff, r9 ;# Write 0x99-1 to R9
mov #0xaa44, &0x0210 ;# Initialize Memory
mov #0xaa55, &0x0212
mov #0xaa66, &0x0214
mov #0xaa77, &0x0216
mov #0xaa35, &0x0218
mov #0xaa99, &0x021A
mov #0xaa55, &0x021C
mov #0xbb55, &0x021E
mov #0xcc55, &0x0220
mov #0xdd55, &0x0222
mov #0xee55, &0x0224
mov #0x3355, &0x0226
mov #0x0202, r10
mov #0x1234, r11
add.b #0x0000, 14(r10) ;# Move +0 to memory @0x210
add.b #0x0001, 16(r10) ;# Move +1 to memory @0x212
add.b #0x0002, 18(r10) ;# Move +2 to memory @0x214
add.b #0x0004, 20(r10) ;# Move +4 to memory @0x216
add.b #0x0008, 22(r10) ;# Move +8 to memory @0x218
add.b #0xffff, 24(r10) ;# Move -1 to memory @0x21A
add.b #0x0000, 27(r10) ;# Move +0 to memory @0x21D
add.b #0x0001, 29(r10) ;# Move +1 to memory @0x21F
add.b #0x0002, 31(r10) ;# Move +2 to memory @0x221
add.b #0x0004, 33(r10) ;# Move +4 to memory @0x223
add.b #0x0008, 35(r10) ;# Move +8 to memory @0x225
add.b #0xffff, 37(r10) ;# Move -1 to memory @0x227
mov #0xaa44, &0x0230 ;# Initialize Memory
mov #0xaa55, &0x0232
mov #0xaa66, &0x0234
mov #0xaa77, &0x0236
mov #0xaa35, &0x0238
mov #0xaa99, &0x023A
mov #0xaa55, &0x023C
mov #0xbb55, &0x023E
mov #0xcc55, &0x0240
mov #0xdd55, &0x0242
mov #0xee55, &0x0244
mov #0x3355, &0x0246
add.b #0x0000, CONSTL_EDE0 ;# Move +0 to memory @0x230
add.b #0x0001, CONSTL_EDE1 ;# Move +1 to memory @0x232
add.b #0x0002, CONSTL_EDE2 ;# Move +2 to memory @0x234
add.b #0x0004, CONSTL_EDE4 ;# Move +4 to memory @0x236
add.b #0x0008, CONSTL_EDE8 ;# Move +8 to memory @0x238
add.b #0xffff, CONSTL_EDEm1 ;# Move -1 to memory @0x23A
add.b #0x0000, CONSTH_EDE0 ;# Move +0 to memory @0x23D
add.b #0x0001, CONSTH_EDE1 ;# Move +1 to memory @0x23F
add.b #0x0002, CONSTH_EDE2 ;# Move +2 to memory @0x241
add.b #0x0004, CONSTH_EDE4 ;# Move +4 to memory @0x243
add.b #0x0008, CONSTH_EDE8 ;# Move +8 to memory @0x245
add.b #0xffff, CONSTH_EDEm1 ;# Move -1 to memory @0x247
#
# NOTE: The following section would not fit in the smallest ROM
# configuration. Therefore, it is executed at the end of
# the "two-op_add.s43" pattern.
#
# mov #0xaa44, &0x0250 ;# Initialize Memory
# mov #0xaa55, &0x0252
# mov #0xaa66, &0x0254
# mov #0xaa77, &0x0256
# mov #0xaa35, &0x0258
# mov #0xaa99, &0x025A
# mov #0xaa55, &0x025C
# mov #0xbb55, &0x025E
# mov #0xcc55, &0x0260
# mov #0xdd55, &0x0262
# mov #0xee55, &0x0264
# mov #0x3355, &0x0266
# add.b #0x0000, &CONSTL_TONY0 ;# Move +0 to memory @0x250
# add.b #0x0001, &CONSTL_TONY1 ;# Move +1 to memory @0x252
# add.b #0x0002, &CONSTL_TONY2 ;# Move +2 to memory @0x254
# add.b #0x0004, &CONSTL_TONY4 ;# Move +4 to memory @0x256
# add.b #0x0008, &CONSTL_TONY8 ;# Move +8 to memory @0x258
# add.b #0xffff, &CONSTL_TONYm1 ;# Move -1 to memory @0x25A
# add.b #0x0000, &CONSTH_TONY0 ;# Move +0 to memory @0x25D
# add.b #0x0001, &CONSTH_TONY1 ;# Move +1 to memory @0x25F
# add.b #0x0002, &CONSTH_TONY2 ;# Move +2 to memory @0x261
# add.b #0x0004, &CONSTH_TONY4 ;# Move +4 to memory @0x263
# add.b #0x0008, &CONSTH_TONY8 ;# Move +8 to memory @0x265
# add.b #0xffff, &CONSTH_TONYm1 ;# Move -1 to memory @0x267
mov #0x9000, r15
/* ---------------------- END OF TEST --------------- */
end_of_test:
nop
br #0xffff
/* ---------------------- INTERRUPT VECTORS --------------- */
.section .vectors, "a"
.word end_of_test ; Interrupt 0 (lowest priority) <unused>
.word end_of_test ; Interrupt 1 <unused>
.word end_of_test ; Interrupt 2 <unused>
.word end_of_test ; Interrupt 3 <unused>
.word end_of_test ; Interrupt 4 <unused>
.word end_of_test ; Interrupt 5 <unused>
.word end_of_test ; Interrupt 6 <unused>
.word end_of_test ; Interrupt 7 <unused>
.word end_of_test ; Interrupt 8 <unused>
.word end_of_test ; Interrupt 9 <unused>
.word end_of_test ; Interrupt 10 Watchdog timer
.word end_of_test ; Interrupt 11 <unused>
.word end_of_test ; Interrupt 12 <unused>
.word end_of_test ; Interrupt 13 <unused>
.word end_of_test ; Interrupt 14 NMI
.word main ; Interrupt 15 (highest priority) RESET
Go to most recent revision | Compare with Previous | Blame | View Log