Bftstl - T - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

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 clear, C is set; otherwise, C is
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.
Usage:
This instruction is very useful for testing I/O and flag bits.
Example:
BFTSTL
Before Execution
X:$FFE2
SR
Explanation of Example:
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 the CCR bits were
cleared).
Condition Codes Affected:
15
14
LF
*
Note:
If all bits in the mask are set to zero, the destination is unchanged, and the C bit is set.
Instruction Fields:
Operation
BFTSTL
Timing:
Refer to the preceding Instruction Fields table
Memory:
Refer to the preceding Instruction Fields table
A-58
Test Bit Field Low
#$0310,X:<<$FFE2
18EC
0000
MR
13
12
11
10
9
*
*
*
*
I1
L
— Set if data limiting occurred during 36-bit source move
C
— Set if all bits specified by the mask are cleared
Clear if not all bits specified by the mask are cleared
Operands
C
#xxxx,DDDDD
4
#xxxx,X:(R2+xx)
6
#xxxx,X:(SP-xx)
6
#xxxx,X:aa
4
#xxxx,X:pp
4
#xxxx,X:xxxx
6
DSP56800 Family Manual
Assembler Syntax:
BFTSTL
BFTSTL
; test low bits 4, 8, and 9 in
; an on-chip peripheral register
After Execution
X:$FFE2
SR
CCR
8
7
6
5
4
L
I0
SZ
E
U
W
2
BFTSTL tests all bits selected by the 16-bit immedi-
ate mask. If all selected bits are clear, then the C bit
2
is set. Otherwise it is cleared.
All registers in DDDDD are permitted except HWS.
2
X:aa represents a 6-bit absolute address. Refer to
2
Absolute Short Address (Direct Addressing):
<aa> on page 4-22.
2
X:pp represents a 6-bit absolute I/O address. Refer
to I/O Short Address (Direct Addressing): <pp>
3
on page 4-23.
BFTSTL
#iiii,X:<ea>
#iiii,D
18EC
0001
3
2
1
0
C
N
Z
V
Comments

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents