<< Previous | Next >>

BIT b,(HL)     Bit Test     Rabbit 2000/3000/4000 Instruction
Opcode
Instruction
Clocks
Operation
---- BIT b,(HL)
7 (2,2,1,2)
(HL) & bit

CB 46

BIT 0,(HL)

7 (2,2,1,2)

(HL) & bit 0

CB 4E

BIT 1,(HL)

7 (2,2,1,2)

(HL) & bit 1

CB 56

BIT 2,(HL)

7 (2,2,1,2)

(HL) & bit 2

CB 5E

BIT 3,(HL)

7 (2,2,1,2)

(HL) & bit 3

CB 66

BIT 4,(HL)

7 (2,2,1,2)

(HL) & bit 4

CB 6E

BIT 5,(HL)

7 (2,2,1,2)

(HL) & bit 5

CB 76

BIT 6,(HL)

7 (2,2,1,2)

(HL) & bit 6

CB 7E

BIT 7,(HL)

7 (2,2,1,2)

(HL) & bit 7


Flags ALTD IOI/IOE
S
Z
L/V
C
F
R
SP
S
D
-
·
-
-
·

Description

Tests bit b (any of the bits 0, 1, 2, 3, 4, 5, 6, or 7) of the byte whose address is in HL.

The Z flag is set if the tested bit is 0, reset the bit is 1.

This is a chained-atomic instruction, meaning that an interrupt cannot take place between this instruction and the instruction following it.


<< Previous | Next >>