BFTST

BFTST

Operation:
<bit field> of Destination

Assembler Syntax:
BFTST <ea>{offset:width}

Attributes: Unsized

Description: Sets the condition codes according to the value
in a bit field at the specified effective address.

The field offset and field width select the field. The field
offset specifies the starting bit of the field. The field
width determines the number of bits in the field.

Condition Codes:
\c32200
X Not affected.
N Set if the most significant bit of the field is set. Cleared
otherwise.
Z Set if all bits in the field are zero. Cleared otherwise.
V Always cleared.
C Always cleared.

Instruction Format:
\i2+++-+---++u6Effective Address,3Mode,3Reg,----1Do,5Offset,1Dw,5Width,

Instruction Fields:
Effective Address field -- Specifies the base location for the bit
field. Only data register direct or control alterable
addressing modes are allowed as shown:
\mA7B

Do field -- Determines how the field offset is specified.
0 -- The Offset field contains the bit field offset.
1 -- Bits [8:6] of the extension word specify a data
register that contains the offset; bits [10:9]
are zero.
Offset field -- Specifies the field offset, depending on Do.
If Do = 0, the Offset field is an immediate operand;
the operand value is in the range 0-31.
If Do = 1, the Offset field is a data register that
contains the offset. The value is in the
range -2^31 to 2^31 - 1.
Ds field -- Determines how the field width is specified.
0 -- The Width field contains the bit field width.
1 -- Bits [2:0] of the extension word specify a data
register that contains the width; bits [3:4]
are zero.
Width field -- Specifies the field width, depending on Dw.
If Dw = 0, the Width field is an immediate operand;
an operand value is in the range 1-31 spec-
ifies a field width of 1-31, and a value of zero
specifies a width of 32.
If Dw = 1, the Width field is a data register that
contains the width. The value modulo 32;
values of 1-31 specify field widths of 1-31,
and a value of zero specifies a width of 32.