dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 445

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
CMP.BP
Operation:
D – S
Description: Compare a byte in memory with the 8-bit portion of a register. The two operands are subtracted to per-
Usage:
Note:
Example:
Explanation of Example:
Condition Codes Affected:
Freescale Semiconductor
Before Execution
A2
0
(no parallel move)
Addresses
form the comparison, and the CCR is updated accordingly. The result of the subtraction operation is
not stored. 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.
This instruction subtracts 8-bit operands. The low-order 8 bits of the register is used for the compari-
son, unless the register is an accumulator, in which case the low-order 8 bits of the FF1 portion are
used. Both the register and the byte located in memory are sign extended internally to 20 bits before
the comparison.
CMP.BP X:$3065,A
Prior to execution, the 36-bit A accumulator contains the value $0:0020:0000, and location $3065 in
data memory contains $44. Execution of the CMP.BP instruction automatically sign extends the mem-
ory byte and low-order 8 bits of A1 to 20 bits, and then it subtracts the memory value from the accu-
mulator. The CCR is updated based on the result of the 8-bit comparison; the A accumulator is un-
changed. Note that this address is equivalent to the upper byte of word address $1832.
E
U
N
Z
V
C
Byte
LF
15
— Set if the extension portion of the 20-bit result is in use
— Set if the 20-bit result is not normalized
— Set if bit 7 of the result is set
— Set if result equals zero
— Set if overflow has occurred in result
— Set if a carry (or borrow) occurs from bit 7 of the result
0020
P4
14
A1
$3066
$3064
$3062
$3068
13
P3
SR
P2
12
Compare Byte (Byte Pointer)
7
MR
88
66
44
22
X Memory
P1
11
0000
0300
A0
0
P0
10
7
Instruction Set Details
77
55
33
11
; compare byte at X:$3065 and A
I1
9
0
Assembler Syntax:
CMP.BP
I0
8
SZ
7
After Execution
6
L
A2
0
Addresses
5
E
Byte
S,D
U
4
CCR
0020
A1
N
$3066
$3064
$3062
3
$3068
(no parallel move)
SR
2
Z
7
V
1
88
66
44
22
X Memory
CMP.BP
0000
0319
0
C
0
A0
7
77
55
33
11
0
A-101

Related parts for dsp56800e