MSP430 Instructions
4-91
16-Bit MSP430X CPU
JNC
Jump if No carry
JLO
Jump if lower (unsigned)
Syntax
JNC
label
JLO
label
Operation
If C = 0:
PC + (2
×
Offset)
→
PC
If C = 1:
execute following instruction
Description
The carry bit C in the status register 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 program counter 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 64 K, 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
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...