BTST (Bit TeST)
BTST
<Description>
This instruction tests a specified bit in a general register or memory location and sets or clears
the Zero flag accordingly. The bit number can be specified by 3-bit immediate data, or by the
lower three bits of an 8-bit general register. The operation is shown schematically below.
The value of the specified bit is not altered.
*Register direct, register indirect, or absolute addressing.
<Operation>
¬ (<Bit No.> of <EAd>)
→
Z
<Assembly-Language Format>
BTST
#xx:3, <EAd>
BTST
Rn, <EAd>
<Examples>
BTST #4, R6L
BTST R1H, @R5
BTST #7, @H'FF6C:8
<Operand Size>
Byte
<Condition Code>
I: Previous value remains unchanged.
H: Previous value remains unchanged.
N: Previous value remains unchanged.
Z: See to "1" if the specified bit is zero;
otherwise cleared to "0".
V: Previous value remains unchanged.
C: Previous value remains unchanged.
I
H
N
Z
V
C
—
—
—
— —
↕
—
—
#xx:3 or Rn
Bit No.
7
0
Test
Byte data in register or memory
<EAd>*
→
63
Содержание H8/300 Series
Страница 2: ...H8 300 Programming Manual...