Vault 7: Projects

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

© 2005-2011 Microchip Technology Inc. DS70157F-page 183
Section 5. Instruction Descriptions
Instruction
Descriptions
5
CALL.L
Call Indirect Subroutine Long
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X
Syntax: {label:} CALL.L Wn
Operands:
Wn [W0, W2, W4, W6, W8, W10, W12]
Operation:
(PC) +2 PC,
(PC<15:1>) TOS<15:1>, SFA bit TOS<0>
(W15)+2 W15
(PC<23:16>) TOS,
(W15)+2 W15
0 SFA bit,
PC<23> PC<23> (see text); (Wn+1)<6:0> PC<22:16>; (Wn)
PC<15:0>
NOP Instruction Register
Status Affected:
SFA
Encoding: 0000 0001 1www w000 0000 ssss
Description: Indirect subroutine call to any User program memory address. First, return
address (PC+2) and the state of the Stack Frame Active bit (SFA) is
pushed onto the system stack, after which the SFA bit is cleared.
Then, the LS 7-bits of (Wn+1) are loaded in PC<22:16>, and the 16-bit
value (Wn) is loaded into PC<15:0>.
PC<23> is not modified by this instruction.
The contents of (Wn+1)<15:7> are ignored.
The value of Wn<0> is also ignored and PC<0> is always set to 0.
The ‘s’ bits specify the address of the Wn source register.
The ‘w’ bits specify the address of the Wn+1 source register.
Words:
1
Cycles:
4
Example 1:
026000 CALL.L W4
026004 MOV W0, W1
. ...
. ...
026844 _FIR: MOV #0x400, W2
026846 ...
; Call _FIR subroutine
; _FIR subroutine start
Before
Instruction
After
Instruction
PC 02 6000 PC 02 6844
W4 6844 W4 6844
W5 0002 W5 0002
W15 A268 W15 A26C
Data A268 FFFF Data A268 6004
Data A26A FFFF Data A26A 0002
SR 0000 SR 0000

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh