Instruction Set Description
188
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
CPUX
4.6.2.28 JMP
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 2, sign
extended, and added to the 20-bit 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 PC.
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 64 K.
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