<< Previous | Next >>

> BIT b,(IX+d)
> BIT b,(IY+d) Bit Test Rabbit 2000/3000/4000 Instruction

> Opcode | Instruction | Clocks | Operation
> ---- | BIT b,(IX+d) | 10 (2,2,2,2,2) | (IX+d) & bit
> DD CB d 46 | BIT 0,(IX+d) | 10 (2,2,2,2,2) | (IX+d) & bit 0
> DD CB d 4E | BIT 1,(IX+d) | 10 (2,2,2,2,2) | (IX+d) & bit 1
> DD CB d 56 | BIT 2,(IX+d) | 10 (2,2,2,2,2) | (IX+d) & bit 2
> DD CB d 5E | BIT 3,(IX+d) | 10 (2,2,2,2,2) | (IX+d) & bit 3
> DD CB d 66 | BIT 4,(IX+d) | 10 (2,2,2,2,2) | (IX+d) & bit 4
> DD CB d 6E | BIT 5,(IX+d) | 10 (2,2,2,2,2) | (IX+d) & bit 5
> DD CB d 76 | BIT 6,(IX+d) | 10 (2,2,2,2,2) | (IX+d) & bit 6
> DD CB d 7E | BIT 7,(IX+d) | 10 (2,2,2,2,2) | (IX+d) & bit 7
> ---- | BIT b,(IY+d) | 10 (2,2,2,2,2) | (IY+d) & bit
> FD CB d 46 | BIT 0,(IY+d) | 10 (2,2,2,2,2) | (IY+d) & bit 0
> FD CB d 4E | BIT 1,(IY+d) | 10 (2,2,2,2,2) | (IY+d) & bit 1
> FD CB d 56 | BIT 2,(IY+d) | 10 (2,2,2,2,2) | (IY+d) & bit 2
> FD CB d 5E | BIT 3,(IY+d) | 10 (2,2,2,2,2) | (IY+d) & bit 3
> FD CB d 66 | BIT 4,(IY+d) | 10 (2,2,2,2,2) | (IY+d) & bit 4
> FD CB d 6E | BIT 5,(IY+d) | 10 (2,2,2,2,2) | (IY+d) & bit 5
> FD CB d 76 | BIT 6,(IY+d) | 10 (2,2,2,2,2) | (IY+d) & bit 6
> FD CB d 7E | BIT 7,(IY+d) | 10 (2,2,2,2,2) | (IY+d) & 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:

> - the sum of data in IX plus the 8-bit signed displacement value d, or
> - the sum of data in IY plus the 8-bit signed displacement value d.

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

<< Previous | Next >>