dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 232

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Bit-Manipulation Unit
7.1.4
The 16-bit logic unit performs any modifications to the operand value before it is written back to the
original register or memory location. This unit performs the following operations for the following
instructions:
Any bit that is not selected by the 16-bit mask is not modified.
7.2
There are three different types of operations performed by the bit-manipulation unit. A description of each
operation appears in its own subsection.
7.2.1
The bit-manipulation unit can test a set of bits within an operand. This testing operation is performed by
the following instructions:
The basic operations performed are:
Example 7-3 presents an example of an instruction that performs this operation.
7.2.2
The bit-manipulation unit can test a set of bits in an operand and execute a conditional branch based on the
result of the test. This operation is performed by the following instructions:
7-4
1. Read the 16-bit operand from memory or from a register.
2. Create a 16-bit mask directly from the instruction itself. In most cases, the instruction
3. Use the mask to select the desired bits within the 16-bit operand that was already read from
4. Test all of the selected bits within this value. Check for whether all selected bits are zeros
5. Write the result of this test to the C bit in the status register (SR).
BFCHG—Inverts the bits selected by the 16-bit mask
BFCLR—Clears the bits selected by the 16-bit mask
BFSET—Sets the bits selected by the 16-bit mask
BFTSTH
BFTSTL
directly provides the 16-bit mask, but for the BRSET and BRCLR instructions, a 16-bit
mask is reduced to 8 bits, where either the upper or lower eight bits are zeros.
an on-chip register or memory location.
or ones, as described in Section 7.1.3, “16-Bit Testing Logic.”
BRCLR
BRSET
Bit-Manipulation Unit Operation
16-Bit Logic Unit
Testing Bits
Conditional Branching
BFTSTL
#$000F,X:$C000
Example 7-3. Testing Bits in an Operand
DSP56800E Core Reference Manual
; Test lower 4 bits of memory location
Freescale Semiconductor

Related parts for dsp56800e