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 436 © 2005-2011 Microchip Technology Inc.
ULNK
De-allocate Stack Frame
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X
Syntax: {label:} ULNK
Operands: None
Operation: W14 W15
(W15) – 2 W15
(TOS) W14
0 SFA bit
Status Affected: SFA
Encoding:
1111 1010 1000 0000 0000 0000
Description: This instruction de-allocates a Stack Frame for a subroutine calling
sequence. The Stack Frame is de-allocated by setting the Stack Pointer
(W15) equal to the Frame Pointer (W14), and then POPping the stack
to reset the Frame Pointer (W14).
Words: 1
Cycles: 1
Example 1:
ULNK ; Unlink the stack frame
Before
Instruction
After
Instruction
W14 2002 W14 2000
W15 20A2 W15 2000
Data 2000 2000 Data 2000 2000
SR 0000 SR 0000
Example 2:
ULNK ; Unlink the stack frame
Before
Instruction
After
Instruction
W14 0802 W14 0800
W15 0812 W15 0800
Data 0800 0800 Data 0800 0800
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