Btst (Bit Test) - Renesas H8/300 Series Programming Manual

Table of Contents

Advertisement

BTST (Bit TeST)

<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
<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.
<EAd>*
Byte data in register or memory
The value of the specified bit is not altered.
*Register direct, register indirect, or absolute addressing.
<Condition Code>
I
— — — — —
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.
#xx:3 or Rn
7
Bit No.
63
H
N
0
Test
BTST
Z
V
C
— —

Advertisement

Table of Contents
loading

Table of Contents