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
Содержание MSP430x1xx
Страница 1: ... 2005 Mixed Signal Products User s Guide SLAU049E ...
Страница 6: ...vi ...
Страница 18: ...1 6 Introduction ...
Страница 36: ...2 18 System Resets Interrupts and Operating Modes ...
Страница 112: ...3 76 ...
Страница 130: ...4 18 Basic Clock Module ...
Страница 152: ...5 22 Flash Memory Controller ...
Страница 160: ...6 8 Supply Voltage Supervisor ...
Страница 168: ...7 8 Hardware Multiplier ...
Страница 192: ...8 24 ...
Страница 200: ...9 8 Digital I O ...
Страница 234: ...11 24 Timer_A ...
Страница 260: ...12 26 Timer_B ...
Страница 291: ...13 31 USART Peripheral Interface UART Mode ...
Страница 314: ...14 23 USART Peripheral Interface SPI Mode ...
Страница 346: ...15 32 USART Peripheral Interface I2C Mode ...
Страница 358: ...16 12 Comparator_A ...
Страница 386: ...17 28 ADC12 ...
Страница 418: ...18 32 ADC10 ...
Страница 432: ...19 14 DAC12 ...