Datasheet
www.ti.com
Instruction Set Description
4.6.2.30 JNC, JLO
JNC Jump if no carry
JLO Jump if lower (unsigned)
JNC label
Syntax
JLO label
Operation If C = 0: PC + (2 × Offset) → PC
If C = 1: execute following instruction
Description
The carry bit C in the SR is tested. If it is reset, the signed 10-bit word offset contained in
the instruction is multiplied by two, sign extended, and added to the 20-bit PC. This
means a jump in the range –511 to +512 words relative to the PC in the full memory
range. If C is set, the instruction after the jump is executed.
JNC is used for the test of the carry bit C.
JLO is used for the comparison of unsigned numbers.
Status Bits Status bits are not affected.
Mode Bits OSCOFF, CPUOFF, and GIE are not affected.
Example If byte EDE < 15, the program continues at Label2. Unsigned data. Data in lower 64KB,
program in full memory range.
CMP.B #15,&EDE ; Is EDE < 15? Info to C
JLO Label2 ; Yes, EDE < 15. C = 0
... ; No, EDE >= 15. Continue
Example The word TONI is added to R5. If no carry occurs, continue at Label0. The address of
TONI is within PC ± 32 K.
ADD TONI,R5 ; TONI + R5 -> R5. Carry -> C
JNC Label0 ; No carry
... ; Carry = 1: continue here
193
SLAU144J–December 2004–Revised July 2013 CPUX
Submit Documentation Feedback
Copyright © 2004–2013, Texas Instruments Incorporated