English
Language : 

TSC80251G2D Datasheet, PDF (26/63 Pages) ATMEL Corporation – B/16-BIT MICROCONTROLLER WITH SERIAL COMMUNICATION INTERFACES
TSC80251G2D
Table 32. Summary of Conditional Jump Instructions (2/2)
Jump if bit
Jump if not bit
Jump if bit and clear
JB <src>, rel
JNB <src>, rel
JBC <dest>, rel
Jump if accumulator is zero
Jump if accumulator is not zero
Compare and jump if not equal
JZ rel
JNZ rel
CJNE <src1>, <src2>, rel
Decrement and jump if not zero DJNZ <dest>, 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
Mnemonic <dest>, <src>(1)
Comments
Binary Mode(2) Source Mode(2)
Bytes States Bytes States
bit51, rel
JB
bit, rel
bit51, rel
JNB
bit, rel
Jump if direct bit is set
Jump if direct bit of 8-bit address location is set
Jump if direct bit is not set
Jump if direct bit of 8-bit address location is not set
3
2/5(3)(6)
3
2/5(3)(6)
5
4/7(3)(6)
4
3/6(3)(6)
3
2/5(3)(6)
3
2/5(3)(6)
5
4/7(3)(6)
4
3/6(3)
bit51, rel
Jump if direct bit is set & clear bit
3
4/7(5)(6)
3
4/7(5)(6)
JBC
bit, rel
Jump if direct bit of 8-bit address location is set and clear 5 7/10(5)(6) 4
6/9(5)(6)
JZ
rel
Jump if ACC is zero
2
2/5(6)
2
2/5(6)
JNZ
rel
Jump if ACC is not zero
2
2/5(6)
2
2/5(6)
A, dir8, rel
Compare direct address to ACC and jump if not equal
3
2/5(3)(6)
3
2/5(3)(6)
CJNE
A, #data, rel
Rn, #data, rel
Compare immediate to ACC and jump if not equal
Compare immediate to register and jump if not equal
3
2/5(6)
3
2/5(6)
3
2/5(6)
4
3/6(6)
@Ri, #data, rel
Compare immediate to indirect and jump if not equal
3
3/6(6)
4
4/7(6)
DJNZ
Rn, rel
dir8, rel
Decrement register and jump if not zero
Decrement direct address and jump if not zero
2
2/5(6)
3
3/6(6)
3
3/6(4)(6)
3
3/6(4)(6)
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.
Rev. A - May 7, 1999
26