BIT b,r

Test bit b of register r.
Function: Z <- _rb
 
Format:
1100 1011
 
byte 1: CB
 
01bb brrr
 
byte 2
 
Description: The specified bit of the given register 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
r may be any one of:
A
111
B
000
C
001
D
010
E
011
H
100
L
101
Data Flow:
 
Timing: 2 M cycles; 8 T states: 4 usec @ 2 MHz
 
Addressing Mode: implicit
 
Byte Codes:
RES  b,r
r:ABCDEHL
CB +b:047404142434445
14F48494A4B4C4D
257505152535455
35F58595A5B5C5D
467606162636465
56F68696A6B6C6D
6777071727374B5
77F78797A7B7C7D
 
Flags:
 
Example:
BIT  4,B

OBJECT CODE
Before:
 
After: