Instruction Reference Manual 29
Description
Tests bit b (anyofthebits0,1,2,3,4,5,6,or7)ofthebyteinr (any of the registers A, B, C, D, E, H, or L).
The Z flag is set if the tested bit is 0, reset if the bit is 1.
BIT b,r
Opcode Instruction Clocks Operation
b,r A B C D E H L BIT b,r 4(2,2) r & bit
CB (0) 47 40 41 42 43 44 45
CB (1) 4F 48 49 4A 4B 4C 4D
CB (2) 57 50 51 52 53 54 55
CB (3) 5F 58 59 5A 5B 5C 5D
CB (4) 67 60 61 62 63 64 65
CB (5) 6F 68 69 6A 6B 6C 6D
CB (6) 77 70 71 72 73 74 75
CB (7) 7F 78 79 7A 7B 7C 7D
Flags ALTD I/O
S Z L/V C F R SP S D
- • - - •