dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 361

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
ADD.BP
Operation:
S + D →
Description: Add a byte stored in memory to the 8-bit portion of the destination register, and store the result in the
Usage:
Example:
Explanation of Example:
Condition Codes Affected:
Freescale Semiconductor
(word address) X:$2000
Before Execution
A2
D
0
destination (D). The value is internally sign extended to 20 bits before the operation. If the destination
is a 16-bit register, it is first correctly sign extended before the 20-bit addition is performed. The con-
dition 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. Absolute addresses are expressed as byte addresses. 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.BP X:$4000,A
Prior to execution, the 36-bit A accumulator contains the value $0:3122:1234. The ADD.BP instruc-
tion automatically sign extends the memory byte to 20 bits and then adds the result to the A2:A1 por-
tion 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
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
13
P3
SR
P2
12
MR
Add Byte (Byte Pointer)
P1
11
1234
FF55
0300
A0
P0
10
Instruction Set Details
; add byte at word address $2000
; to A accumulator
I1
9
Assembler Syntax:
ADD.BP
I0
8
SZ
7
After Execution
6
L
A2
0
5
E
S,D
U
4
CCR
3177
A1
X:$2000
N
3
(no parallel move)
SR
2
Z
V
1
FF55
ADD.BP
1234
0310
C
0
A0
A-17

Related parts for dsp56800e