
2.2.20 BTST
BTST (Bit TeST)
Bit Test
Operation
¬ (<Bit No.> of <EAd>)
→
Z
Assembly-Language Format
BTST
#xx:3, <EAd>
BTST
Rn, <EAd>
Operand Size
Byte
Condition Code
H: Previous value remains unchanged.
N: Previous value remains unchanged.
Z:
Set to 1 if the specified bit is zero;
otherwise cleared to 0.
V: Previous value remains unchanged.
C: Previous value remains unchanged.
I
UI
H
U
N
Z
V
C
—
—
—
—
—
↕
—
—
Description
This instruction tests a specified bit in the destination operand and sets or clears the Z flag
according to the result. The bit number can be specified by 3-bit immediate data, or by the lower
three bits of a general register. The destination operand remains unchanged.
Available Registers
Rd:
R0L to R7L, R0H to R7H
Rn:
R0L to R7L, R0H to R7H
ERd: ER0 to ER7
7
0
Bit No.
Test
Specified by #xx:3 or Rn
<EAd>
69