<< Previous | Next >>

BIT b,(HL)     Bit Test     Rabbit 2000/3000/4000/5000 Instruction

Opcode
Instruction
Operation
---- BIT b,(HL) (HL) & bit
CB 46 BIT 0,(HL) (HL) & bit 0
CB 4E BIT 1,(HL) (HL) & bit 1
CB 56 BIT 2,(HL) (HL) & bit 2
CB 5E BIT 3,(HL) (HL) & bit 3
CB 66 BIT 4,(HL) (HL) & bit 4
CB 6E BIT 5,(HL) (HL) & bit 5
CB 76 BIT 6,(HL) (HL) & bit 6
CB 7E BIT 7,(HL) (HL) & bit 7

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 2000/3000/4000
7
n/a
n/a
Rabbit 5000
7
7
5

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.


Rabbit Instructions << Previous | Next >> rabbit.com