Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
16-bit MCU and DSC Programmer’s Reference Manual
DS70157F-page 252 © 2005-2011 Microchip Technology Inc.
GOTO
Unconditional Indirect Jump
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X
Syntax: {label:} GOTO Wn
Operands: Wn ∈ [W0 ... W15]
Operation: 0 → PC<22:16>
(Wn<15:1>) → PC<15:1>
0 → PC<0>
NOP → Instruction Register
Status Affected: None
Encoding:
0000 0001 0000 0100 0000 ssss
Description: Unconditional indirect jump within the first 32K words of program memory.
Zero is loaded into PC<22:16> and the value specified in (Wn) is loaded
into PC<15:1>. Since the PC must always reside on an even address
boundary, Wn<0> is ignored.
The ‘s’ bits select the source register.
Words: 1
Cycles: 4
Example 1:
006000 GOTO W4
006002 MOV W0, W1
. ...
. ...
007844 _THERE: MOV #0x400, W2
007846 ...
; Jump unconditionally
; to 16-bit value in W4
; Code execution
; resumes here
Before
Instruction
After
Instruction
W4 7844 W4 7844
PC 00 6000 PC 00 7844
SR 0000 SR 0000
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ64GA004-Programmers_Reference_Manual.pdf