BIT b,r |
Test bit b of register r. |
Function: |
Z
|
Format: |
|
byte 1: CB |
|
|
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: | A | B | C | D | E | H | L |
CB + | b: | 0 | 47 | 40 | 41 | 42 | 43 | 44 | 45 |
| 1 | 4F | 48 | 49 | 4A | 4B | 4C | 4D |
2 | 57 | 50 | 51 | 52 | 53 | 54 | 55 |
3 | 5F | 58 | 59 | 5A | 5B | 5C | 5D |
4 | 67 | 60 | 61 | 62 | 63 | 64 | 65 |
5 | 6F | 68 | 69 | 6A | 6B | 6C | 6D |
6 | 77 | 70 | 71 | 72 | 73 | 74 | B5 |
7 | 7F | 78 | 79 | 7A | 7B | 7C | 7D |
|
Flags: |
|
Example: |
BIT 4,B |
OBJECT CODE |
Before: |
After: |
|
|