rb <- 1
SET
b,r
b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | |
---|---|---|---|---|---|---|---|---|
1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | $CB |
1 | 1 | b | r |
Bit b in register r (any of registers B, C, D, E, H, L, or A) is set. In the assembled object code, operands b and r are specified as follows:
Bit Tested | b | Reg | r | Hex | Reg | r | Hex | Reg | r | Hex | Reg | r | Hex | Reg | r | Hex | Reg | r | Hex | Reg | r | Hex |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 000 | A | 111 | $C7 | B | 000 | $C0 | C | 001 | $C1 | D | 010 | $C2 | E | 011 | $C3 | H | 100 | $C4 | L | 101 | $C5 |
1 | 001 | A | 111 | $CF | B | 000 | $C8 | C | 001 | $C9 | D | 010 | $CA | E | 011 | $CB | H | 100 | $CC | L | 101 | $CD |
2 | 010 | A | 111 | $D7 | B | 000 | $D0 | C | 001 | $D1 | D | 010 | $D2 | E | 011 | $D3 | H | 100 | $D4 | L | 101 | $D5 |
3 | 011 | A | 111 | $DF | B | 000 | $D8 | C | 001 | $D9 | D | 010 | $DA | E | 011 | $DB | H | 100 | $DC | L | 101 | $DD |
4 | 100 | A | 111 | $E7 | B | 000 | $E0 | C | 001 | $E1 | D | 010 | $E2 | E | 011 | $E3 | H | 100 | $E4 | L | 101 | $E5 |
5 | 101 | A | 111 | $EF | B | 000 | $E8 | C | 001 | $E9 | D | 010 | $EA | E | 011 | $EB | H | 100 | $EC | L | 101 | $ED |
6 | 110 | A | 111 | $F7 | B | 000 | $F0 | C | 001 | $F1 | D | 010 | $F2 | E | 011 | $F3 | H | 100 | $F4 | L | 101 | $F5 |
7 | 111 | A | 111 | $FF | B | 000 | $F8 | C | 001 | $F9 | D | 010 | $FA | E | 011 | $FB | H | 100 | $FC | L | 101 | $FD |
None
Upon the execution of
SET 4,A
bit 4 in Register A is set. Bit 0 is the least- significant bit.