dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 285

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
BFTSTL
Operation:
Test <bit field> of destination for zeros
Test <bit field> of destination for zeros
Description: Test all selected bits of the destination operand. If all selected bits are cleared, C is set; otherwise, C is
Usage:
Example:
Explanation of Example:
Condition Codes Affected:
Note:
Instruction Fields:
Timing:
Memory:
Freescale Semiconductor
Operation
BFTSTL
cleared. The bits to be tested are selected by a 16-bit immediate value in which every bit set is to be
tested. This instruction performs two destination accesses.
This instruction is very useful for testing I/O and flag bits.
BFTSTL
Prior to execution, the 16-bit X memory location X:$FFE2 contains the value $18EC. Execution of the
instruction tests the state of bits 4, 8, and 9 in X:$FFE2 and sets C (because all of the bits specified in
the immediate mask were clear).
If all bits in the mask are set to zero, the destination is unchanged, and the C bit is set. Refer to
Table A-9 on page A-13 when the destination is the SR register.
Refer to the preceding Instruction Fields table
Refer to the preceding Instruction Fields table
Before Execution
X:$FFE2
LF
15
#<MASK16>,X:(R2+xx)
#<MASK16>,X:(SP-xx)
SR
#<MASK16>,DDDDD
14
#<MASK16>,X:<<pp
#<MASK16>,X:xxxx
*
#<MASK16>,X:aa
L
C
13
Operands
*
— Set if data limiting occurred during 36-bit source move
— Set if all bits specified by the mask are cleared
#$0310,X:<<$FFE2
12
18EC
0000
*
MR
Cleared if not all bits specified by the mask are cleared
11
*
Test Bit Field Low
10
*
Instruction Set Details
I1
9
C
4
6
6
4
4
6
Assembler Syntax:
BFTSTL
BFTSTL
I0
8
W
2
2
2
2
2
3
SZ
7
; test low bits 4, 8, and 9
BFTSTL tests all bits selected by the 16-bit immediate
mask. If all selected bits are clear, then the C bit is set.
Otherwise it is cleared.
All registers in DDDDD are permitted except HWS.
X:aa represents a 6-bit absolute address. Refer to Abso-
lute Short Address (Direct Addressing): <aa> on page
4-22.
X:<<pp represents a 6-bit absolute I/O address. Refer to
I/O Short Address (Direct Addressing): <pp> on page
4-23.
L
6
5
E
After Execution
X:$FFE2
#iiii,X:<ea>
#iiii,D
U
4
CCR
SR
N
3
Comments
2
Z
18EC
0001
V
1
BFTSTL
C
0
A-55

Related parts for dsp56800