BIT b,(HL)

Test bit b of indirectly addressed memory location (HL).
Function: Z <- _(HL)b
 
Format:
1100 1011
 
byte 1: CB
 
01bb b110
 
byte 2
 
Description: The specified bit of the memory location addressed by the contents of the HL register pair is tested and the Z flag is set according to the result. b may be any one of:
0
000
1
001
2
010
3
011
4
100
5
101
6
110
7
111

 
Data Flow:
 
Timing: 3 M cycles; 12 T states: 6 usec @ 2MHz
 
Addressing Mode: indirect
 
Byte Codes:
 
Flags:
 
Example:

OBJECT CODE
Before:
 
After: