Table of Contents

Advertisement

2.2.20 BTST

BTST (Bit TeST)
Operation
¬ (<Bit No.> of <EAd>) → Z
Assembly-Language Format
BTST #xx:3, <EAd>
BTST Rn, <EAd>
Operand Size
Byte
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.
Specified by #xx:3 or Rn
Bit No.
7
<EAd>
Available Registers
Rd:
R0L to R7L, R0H to R7H
Rn:
R0L to R7L, R0H to R7H
ERd: ER0 to ER7
Test
Condition Code
I
UI H
— — — — —
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.
0
69
Bit Test
U
N
Z
V
C
— —

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents