MSP430 Instructions
4-89
16-Bit MSP430X CPU
JMP
Jump unconditionally
Syntax
JMP
label
Operation
PC + (2
×
Offset)
→
PC
Description
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 an
unconditional jump in the range -511 to +512 words relative to the PC in the full
memory. The JMP instruction may be used as a BR or BRA instruction within its
limited range relative to the program counter.
Status Bits
Status bits are not affected
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected
Example
The byte STATUS is set to 10. Then a jump to label MAINLOOP is made. Data
in lower 64 K, program in full memory range.
MOV.B
#10,&STATUS ; Set STATUS to 10
JMP
MAINLOOP
; Go to main loop
Example
The interrupt vector TAIV of Timer_A3 is read and used for the program flow.
Program in full memory range, but interrupt handlers always starts in lower
64K.
ADD
&TAIV,PC
; Add Timer_A interrupt vector to PC
RETI
; No Timer_A interrupt pending
JMP
IHCCR1
; Timer block 1 caused interrupt
JMP
IHCCR2
; Timer block 2 caused interrupt
RETI
; No legal interrupt, return
Содержание 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 ...