dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 646

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
TST.W
Operation:
S – 0
Description: Compare 16 bits of the specified source register or memory location with zero, and set the condition
Example:
Explanation of Example:
Note:
Condition Codes Affected:
A-302
(no parallel move)
codes accordingly. No result is stored, although the condition codes are updated. The result is not af-
fected by the state of the saturation bit (SA).
TST.W
Prior to execution, location X:$0007 contains the value $FC00, and the 16-bit SR contains the value
$0300. The execution of the instruction compares the value in the X0 register with zero and updates
the CCR accordingly. The contents of location X:$0007 are not affected.
This instruction does not set the same set of condition codes that the TST instruction does. Both in-
structions correctly set the V, N, Z, and C bits, but TST sets the E bit whereas TST.W does not. TST.W
is a 16-bit test operation when it is executed on an accumulator.
N
Z
V
C
Before Execution
X:$0007
LF
15
— Set if bit 15 of the result is set
— Set if all bits in the result are zero
— Always cleared
— Always cleared
SR
P4
14
X:$0007
13
P3
P2
12
FC00
0300
MR
DSP56800E Core Reference Manual
P1
11
P0
10
; set condition codes using X:$0007
I1
Test Word
9
Assembler Syntax:
TST.W
I0
8
SZ
7
6
L
5
E
After Execution
X:$0007
S
U
4
CCR
SR
N
3
(no parallel move)
2
Z
FC00
0308
Freescale Semiconductor
V
1
C
0
TST.W

Related parts for dsp56800e