Example 1, Example 2, Instruction formats and opcodes instruction fields – Freescale Semiconductor StarCore SC140 User Manual
Page 344: Adda r0,r1

A-30
SC140 DSP Core Reference Manual
ADDA
Example 1
adda r0,r1
Example 2
move.l #$8,mctl ;assigns m0 to r0, modulo arithmetic
move.l #$10,m0 ;puts modulo 16 in m0
move.w #$c,r0 ;initializes 12 to r0
nop
adda #$8,r0,r1 ; 8 + 12 = 20 or 4 modulo 16
Instruction Formats and Opcodes
Instruction Fields
Rn
RRR
Address Register
Register/Memory Address
Before
After
MCTL
$0000 0000
R0
$0000 1100
R1
$0000 2200
$0000 3300
Register/Memory Address
Before
After
MCTL
$0000
0008
R0
$0000
000c
R1
$0000
0000
$0000
0004
Instruction
Words Cycles Type
Opcode
15
8
7
0
ADDA #u5,Rx
1
1
2
1
1
1
0
R R R R
0
1
0
i
i
i
i
i
15
8
7
0
ADDA #s16,rx,Rn
2
1
4
0
0
1
0
r
r
r
r
i
i
i
0
1
R R R
1
0
0
i
i
i
i
i
i
i
i
i
i
i
i
i
15
8
7
0
ADDA rx,Rx
1
1
2
1
1
1
0
R R R R
0
0
0
1
r
r
r
r
000
R0
010
R2
100
R4
110
R6
001
R1
011
R3
101
R5
111
R7
Note:
This instruction can specify R8-R15 as operands by using a high register prefix.