Intel Embedded Microcontroller Microscope & Magnifier User Manual


 
A-65
INSTRUCTION SET REFERENCE
JB bit51,rel
JB bit,rel
Function: Jump if bit set
Description: If the specified bit is a one, jump to the address specified; otherwise proceed with the next
instruction. The branch destination is computed by adding the signed relative displacement
in the third instruction byte to the PC, after incrementing the PC to the first byte of the next
instruction. The bit tested is not modified.
Flags:
Example: Input port 1 contains 11001010B and the accumulator contains 56 (01010110B). After the
instruction sequence
JB P1.2,LABEL1
JB ACC.2,LABEL2
program execution continues at label LABEL2.
Variations
JB bit51,rel
Binary Mode Source Mode
Not Taken Taken Not Taken Taken
Bytes: 33 33
States: 25 25
Hex Code in: Binary Mode = [Encoding]
Source Mode = [Encoding]
Operation: JB
(PC) (PC) + 3
IF (bit51) = 1
THEN
(PC) (PC) + rel
JB bit,rel
Binary Mode Source Mode
Not Taken Taken Not Taken Taken
Bytes: 55 44
States: 47 36
[Encoding]
Hex Code in: Binary Mode = [A5][Encoding]
Source Mode = [Encoding]
CY AC OV N Z
—————
[Encoding] 0 0 1 0 0 0 0 0 bit addr rel. addr
1 0 1 0 1 0 0 1 0 0 1 0 0 y y direct addr rel. addr