# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# PIC24FJ64GA004 - Programmers Reference Manual

- 1
- 2
…
- 178
- 179
- 180
- 181
- 182
…
- 501
- 502

16-bit MCU and DSC Programmer’s Reference Manual
DS70157F-page 180 © 2005-2011 Microchip Technology Inc.
CALL
Call Indirect Subroutine
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X X X
Syntax: {label:} CALL Wn
Operands:
Wn ∈ [W0 ... W15]
Operation:
(PC) + 2 → PC
(PC<15:0>) → TOS
(W15) + 2 → W15
(PC<23:16>) → TOS
(W15) + 2 → W15
0 → PC<22:16>
(Wn<15:1>) → PC<15:1>
NOP → Instruction Register
Status Affected:
None
Encoding: 0000 0001 0000 0000 0000 ssss
Description: Indirect subroutine call over the first 32K instructions of program memory.
Before the CALL is made, the 24-bit return address (PC + 2) is PUSHed
onto the stack. After the return address is stacked, Wn<15:1> is loaded
into PC<15:1> and PC<22:16> is cleared. Since PC<0> is always ‘0’,
Wn<0> is ignored.
The ‘s’ bits select the source register.
Words:
1
Cycles:
2
Example 1:
001002 CALL W0
001004 ...
. ...
001600 _BOOT: MOV #0x400, W2
001602 MOV #0x300, W6
. ...
; Call BOOT subroutine indirectly
; using W0
; _BOOT starts here
Before
Instruction
After
Instruction
PC 00 1002 PC 00 1600
W0 1600 W0 1600
W15 6F00 W15 6F04
Data 6F00 FFFF Data 6F00 1004
Data 6F02 FFFF Data 6F02 0000
SR 0000 SR 0000

- 1
- 2
…
- 178
- 179
- 180
- 181
- 182
…
- 501
- 502