
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 1110RRRR0 1 0 iiiii
15 8 7 0
ADDA #s16,rx,Rn 2 1 4 0010rrrriii01RRR
100iiiiiiiiiiiii
15 8 7 0
ADDA rx,Rx 1 1 2 1110RRRR0001rrrr
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.
Komentáře k této Příručce