SET b,r

Operation

rb <- 1

Mnemonic

SET

Operands

b,r

b7b6b5b4b3b2b1b0
1 1 0 0 1 0 1 1$CB
1 1 br

Description

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 TestedbRegrHexRegrHexRegrHexRegrHexRegrHexRegrHexRegrHex
0000A111$C7B000$C0C001$C1D010$C2E011$C3H100$C4L101$C5
1001A111$CFB000$C8C001$C9D010$CAE011$CBH100$CCL101$CD
2010A111$D7B000$D0C001$D1D010$D2E011$D3H100$D4L101$D5
3011A111$DFB000$D8C001$D9D010$DAE011$DBH100$DCL101$DD
4100A111$E7B000$E0C001$E1D010$E2E011$E3H100$E4L101$E5
5101A111$EFB000$E8C001$E9D010$EAE011$EBH100$ECL101$ED
6110A111$F7B000$F0C001$F1D010$F2E011$F3H100$F4L101$F5
7111A111$FFB000$F8C001$F9D010$FAE011$FBH100$FCL101$FD

Condition Bits Affected

None

Example

Upon the execution of

	SET	4,A

bit 4 in Register A is set. Bit 0 is the least- significant bit.