dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 640

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
TST.B
Operation:
S – 0
Description: Compare the byte portion of a register, or a byte that is located in memory, with zero, and set the con-
Example:
Explanation of Example:
Condition Codes Affected:
A-296
Before Execution
A2
8
(no parallel move)
dition codes accordingly. If the source operand is a register, the byte is sign extended to 20 bits before
the comparison is performed. The N, Z, V, and C condition codes are calculated based on the 8-bit re-
sult. If the source operand is a register, the E and U condition codes are also calculated, but they are
based on the 20-bit result. The source operand is not modified. The result is not affected by the state
of the saturation bit (SA).
TST.B
Prior to execution, the 36-bit A accumulator contains the value $8:0283:0000, and the 16-bit SR con-
tains the value $0300. Execution of the TST.B instruction compares the value in the low-order 8 bits
of A1 with zero and updates the CCR accordingly. The contents of the A accumulator are not affected.
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 all bits in the result are zero
— Always cleared
— Always cleared
0283
P4
14
A1
A
13
P3
SR
P2
12
MR
DSP56800E Core Reference Manual
Test Byte (Word Pointer)
P1
11
0000
0300
A0
P0
10
;set condition codes for the byte value in A
I1
9
Assembler Syntax:
TST.B
I0
8
SZ
7
After Execution
6
L
A2
8
5
E
S
U
4
CCR
0283
A1
N
3
(no parallel move)
SR
2
Z
Freescale Semiconductor
V
1
0000
0318
C
0
A0
TST.B

Related parts for dsp56800e