# Vault 7: Projects

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

### Protego

# PIC24FJ64GA004 - Programmers Reference Manual

- 1
- 2
…
- 345
- 346
- 347
- 348
- 349
…
- 501
- 502

© 2005-2011 Microchip Technology Inc. DS70157F-page 347
Section 5. Instruction Descriptions
Instruction
Descriptions
5
RCALL
Relative Call
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X X X
Syntax: {label:} RCALL Expr
Operands: Expr may be an absolute address, label or expression.
Expr is resolved by the linker to a Slit16, where Slit16 ∈ [-32768 ... 32767].
Operation: (PC) + 2 → PC
(PC<15:0>) → (TOS)
(W15) + 2 → W15
(PC<22:16>) → (TOS)
(W15) + 2 → W15
(PC) + (2 * Slit16) → PC
NOP → Instruction Register
Status Affected: None
Encoding: 0000 0111 nnnn nnnn nnnn nnnn
Description: Relative subroutine call with a range of 32K program words forward or back
from the current PC. Before the call is made, the return address (PC + 2) is
PUSHed onto the stack. After the return address is stacked, the
sign-extended 17-bit value (2 * Slit16) is added to the contents of the PC
and the result is stored in the PC.
The ‘n’ bits are a signed literal that specifies the size of the relative call (in
program words) from (PC + 2).
Note: When possible, this instruction should be used instead of CALL,
since it only consumes one word of program memory.
Words: 1
Cycles: 2
Example 1:
012004 RCALL _Task1
012006 ADD W0, W1, W2
. ...
. ...
012458 _Task1: SUB W0, W2, W3
01245A ...
; Call _Task1
; _Task1 subroutine
Before
Instruction
After
Instruction
PC 01 2004 PC 01 2458
W15 0810 W15 0814
Data 0810 FFFF Data 0810 2006
Data 0812 FFFF Data 0812 0001
SR 0000 SR 0000

- 1
- 2
…
- 345
- 346
- 347
- 348
- 349
…
- 501
- 502