Instruction Set
3-44
RISC 16-Bit CPU
JC
Jump if carry set
JHS
Jump if higher or same
Syntax
JC
label
JHS
label
Operation
If C = 1: PC + 2
×
offset −> PC
If C = 0: execute following instruction
Description
The status register carry bit (C) is tested. If it is set, the 10-bit signed offset
contained in the instruction LSBs is added to the program counter. If C is reset,
the next instruction following the jump is executed. JC (jump if carry/higher or
same) is used for the comparison of unsigned numbers (0 to 65536).
Status Bits
Status bits are not affected.
Example
The P1IN.1 signal is used to define or control the program flow.
BIT
#01h,&P1IN
; State of signal −> Carry
JC
PROGA
; If carry=1 then execute program routine A
......
; Carry=0, execute program here
Example
R5 is compared to 15. If the content is higher or the same, branch to LABEL.
CMP
#15,R5
JHS
LABEL
; Jump is taken if R5
≥
15
......
; Continue here if R5
<
15
Содержание 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 ...