Btst bit test btst – Motorola DSP96002 User Manual
Page 251
MOTOROLA
DSP96002 USER’S MANUAL
A - 63
BTST
Bit Test
BTST
Operation:
S{n}
→
C
S{n}
→
C
S{n}
→
C
S{n}
→
C
S{n}
→
C
S{n}
→
C
S{n}
→
C
Assembler Syntax:
BTST #bit,X: ea
BTST #bit,X: aa
BTST #bit,X: pp
BTST #bit,Y: ea
BTST #bit,Y: aa
BTST #bit,Y: pp
BTST #bit,S
Description:
The nth bit of the source operand is tested and the state of the nth bit is reflected in the C condition code
bit. All memory alterable addressing modes may be used. Register Direct, Absolute Short and I/O Short
addressing may also be used.
The bit to be tested is selected by an immediate bit number 0-31. When used with the appropriate rotate
instructions, this instruction is useful for serial to parallel conversions.
If the system stack register SSH is specified as a source operand, the system stack pointer SP is postdec-
remented by 1 after SSH is read.
CCR Condition Codes:
C
- Set if bit tested is set. Cleared otherwise.
V
- Not affected.
Z
- Not affected.
N
- Not affected.
I
- Not affected.
LR
- Not affected.
–
R
- Not affected.
A
- Not affected.
ER Status Bits: Not affected.
IER Flags: Not affected.