dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 360

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
ADD.B
Operation:
S + D →
Description: Add a 9-bit signed immediate integer to the 8-bit portion of the destination register, and store the result
Usage:
Example:
Explanation of Example:
Condition Codes Affected:
Instruction Fields:
Instruction Opcodes:
Timing:
Memory:
A-16
ADD.B #xxx,EEE
Operation
ADD.B
Before Execution
A2
D
0
in the destination (D). The value is internally sign extended to 20 bits before the operation. If the des-
tination is a 16-bit register, it is first correctly sign extended before the 20-bit addition is performed.
The immediate integer is used to represent 8-bit unsigned values from 0 to 255 as well as the signed
range: –128 to 127. The condition codes are calculated based on the 8-bit result, with the exception of
the E and U bits, which are calculated based on the 20-bit result. The result is not affected by the state
of the saturation bit (SA).
This instruction can be used for both integer and fractional two’s-complement data.
ADD.B
Prior to execution, the 36-bit A accumulator contains the value $0:3122:1234. The ADD.B instruction
automatically sign extends the immediate value to 20 bits and then adds the result to the A2:A1 portion
of the A accumulator. The 8-bit result ($77) is stored back into the low-order 8 bits of A1.
E
U
N
Z
V
C
2 oscillator clock cycle
2 program word
LF
15
— Set if the extension portion of the 20-bit result is in use
— Set if the 20-bit result is unnormalized
— Set if bit 7 of the result is set
— Set if the result equals zero
— Set if overflow has occurred in the result
— Set if a carry occurs from bit 7 of the result
(no parallel move)
3122
P4
14
A1
#$55,A
13
P3
Operands
#xxx,EEE
SR
P2
12
MR
DSP56800E Core Reference Manual
Add Byte (Word Pointer)
P1
11
1234
0300
A0
15
P0
0
10
1
; add hex 55 to A accumulator
I1
9
C
2
0
Assembler Syntax:
ADD.B
I0
8
W
12
2
0
SZ
7
Add 9-bit signed immediate
11
0
After Execution
6
L
A2
0
1
5
E
E
S,D
U
4
CCR
E
8
3177
iiiiiiiiiiiiiiii
A1
N
3
E
7
(no parallel move)
Comments
SR
1
2
Z
Freescale Semiconductor
0
V
1
0
4
1234
0310
C
0
A0
ADD.B
0
3
0
1
0
0

Related parts for dsp56800e