8051 Instruction Set Manual

JB

The JB instruction branches to the address specified in the second operand if the value of the bit specified in the first operand is 1. The bit that is tested is not modified. No flags are affected by this instruction.

See Also: JNB

JB bit, offset
CACF0RS1RS0OV P
Bytes3
Cycles2
Encoding
00100000bitoffset
Operation
JB
PC = PC + 3
IF (bit) = 1
  PC = PC + offset
Example
JB P1.2 LABEL