dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 415

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
BFTSTL
Operation:
Test <bitfield> of destination for zeros (no parallel move)
Description: Test all selected bits in the destination operand. If all selected bits are clear, C is set; otherwise, C is
Usage:
Example:
Explanation of Example:
Condition Codes Affected:
Note:
Freescale Semiconductor
cleared. A 16-bit immediate value is used to specify which bits are tested. Those bits that are set in the
immediate value are the same bits that are tested in the destination; those bits that are cleared in the
immediate value are ignored in the destination. This instruction performs two destination accesses.
This instruction is very useful for testing I/O and flag bits.
BFTSTL #$0310,X:$5000
Prior to execution, the 16-bit X memory location X:$5000 contains the value $0CC0. Execution of the
instruction tests the state of bits 4, 8, and 9 in X:$5000 and sets the C bit (because all the selected bits
were cleared).
For destination operand SR:
For other destination operands:
L
C
If all bits in the mask are cleared, the instruction executes two NOPs and sets the C bit.
Before Execution
X:$5000
LF
15
— Set if data limiting occurred during 36-bit source move
— Set if all bits specified by the mask are set
SR
P4
14
Bits 14–10 of the mask operand must be cleared.
Cleared if at least 1 bit specified by the mask is not set
13
P3
P2
12
0CC0
0300
MR
P1
11
P0
10
Test Bitfield Low
Instruction Set Details
I1
9
Assembler Syntax:
I0
8
; test low bits 4, 8, and 9 in
; an on-chip peripheral register
SZ
7
6
L
5
E
After Execution
X:$5000
BFTSTL#iiii,X:<ea>(no parallel move)
BFTSTL#iiii,D (no parallel move)
U
4
CCR
SR
N
3
2
Z
0CC0
0301
V
1
BFTSTL
C
0
A-71

Related parts for dsp56800e