
Rev. A - May 7, 1999
26
TSC80251G2D
Table 32. Summary of Conditional Jump Instructions (2/2)
Notes:
1. A shaded cell denotes an instruction in the C51 Architecture.
2. States are given as jump not-taken/taken.
3. If this instruction addresses an I/O Port (Px, x= 0-3), add 1 to the number of states. Add 2 if it addresses a Peripheral SFR.
4. If this instruction addresses an I/O Port (Px, x= 0-3), add 2 to the number of states. Add 3 if it addresses a Peripheral SFR.
5. If this instruction addresses an I/O Port (Px, x= 0-3), add 3 to the number of states. Add 5 if it addresses a Peripheral SFR.
6. In internal execution only, add 1 to the number of states of the ‘jump taken’ if the destination address is internal and odd.
Jump if bit
JB <src>, rel
(PC)
←
(PC) + size (instr);
IF [src opnd= 1] THEN (PC)
←
(PC) + rel
(PC)
←
(PC) + size (instr);
IF [src opnd= 0] THEN (PC)
←
(PC) + rel
(PC)
←
(PC) + size (instr);
IF [dest opnd= 1] THEN
dest opnd
←
0
(PC)
←
(PC) + rel
(PC)
←
(PC) + size (instr);
IF [(A)= 0] THEN (PC)
←
(PC) + rel
(PC)
←
(PC) + size (instr);
IF [(A)
≠
0] THEN (PC)
←
(PC) + rel
(PC)
←
(PC) + size (instr);
IF [src opnd1 < src opnd2] THEN (CY)
←
1
IF [src opnd1
≥
src opnd2] THEN (CY)
←
0
IF [src opnd1
≠
src opnd2] THEN (PC)
←
(PC) + rel
(PC)
←
(PC) + size (instr); dest opnd
←
dest opnd -1;
IF [
(Z)] THEN (PC)
←
(PC) + rel
Binary Mode
(2)
Jump if not bit
JNB <src>, rel
Jump if bit and clear
JBC <dest>, rel
Jump if accumulator is zero
JZ rel
Jump if accumulator is not zero
JNZ rel
Compare and jump if not equal
CJNE <src1>, <src2>, rel
Decrement and jump if not zero
DJNZ <dest>, rel
Mnemonic
<dest>, <src>
(1)
Comments
Source Mode
(2)
Bytes
States
Bytes
States
JB
bit51, rel
Jump if direct bit is set
3
2/5
(3)(6)
4/7
(3)(6)
2/5
(3)(6)
4/7
(3)(6)
4/7
(5)(6)
7/10
(5)(6)
2/5
(6)
2/5
(6)
2/5
(3)(6)
2/5
(6)
2/5
(6)
3/6
(6)
2/5
(6)
3/6
(4)(6)
3
2/5
(3)(6)
3/6
(3)(6)
2/5
(3)(6)
3/6
(3)
4/7
(5)(6)
6/9
(5)(6)
2/5
(6)
2/5
(6)
2/5
(3)(6)
2/5
(6)
3/6
(6)
4/7
(6)
3/6
(6)
3/6
(4)(6)
bit, rel
Jump if direct bit of 8-bit address location is set
5
4
JNB
bit51, rel
Jump if direct bit is not set
3
3
bit, rel
Jump if direct bit of 8-bit address location is not set
5
4
JBC
bit51, rel
Jump if direct bit is set & clear bit
3
3
bit, rel
Jump if direct bit of 8-bit address location is set and clear
5
4
JZ
rel
Jump if ACC is zero
2
2
JNZ
rel
Jump if ACC is not zero
2
2
CJNE
A, dir8, rel
Compare direct address to ACC and jump if not equal
3
3
A, #data, rel
Compare immediate to ACC and jump if not equal
3
3
Rn, #data, rel
Compare immediate to register and jump if not equal
3
4
@Ri, #data, rel
Compare immediate to indirect and jump if not equal
3
4
DJNZ
Rn, rel
Decrement register and jump if not zero
2
3
dir8, rel
Decrement direct address and jump if not zero
3
3