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 342 © 2005-2011 Microchip Technology Inc.
PUSH
Push Ws to TOS
Implemented in: PIC24F PIC24H PIC24E dsPIC30F dsPIC33F dsPIC33E
X X X X X X
Syntax: {label:} PUSH Ws
[Ws]
[Ws++]
[Ws--]
[--Ws]
[++Ws]
[Ws+Wb]
Operands: Ws [W0 ... W15]
Wb [W0 ... W15]
Operation: (Ws) (TOS)
(W15) + 2 W15
Status Affected: None
Encoding: 0111 1www w001 1111 1ggg ssss
Description: The contents of Ws are written to the Top-of-Stack (TOS) location and
then the Stack Pointer (W15) is incremented by 2.
The ‘w’ bits define the offset register Wb.
The ‘g’ bits select the source Address mode.
The ‘s’ bits select the source register.
Note 1: This instruction operates in Word mode only.
2: This instruction is a specific version of the “MOV Ws, Wd
instruction (MOV Ws, [W15++]). It reverse assembles as
MOV.
Words: 1
Cycles:
1
(1)
Note 1:
In dsPIC33E and PIC24E devices, the listed cycle count does not apply to read and
read-modify-write operations on non-CPU Special Function Registers. For more
details, see
Note 3
in
Section 3.2.1 “Multi-Cycle Instructions”
.
Example 1:
PUSH W2 ; Push W2 to TOS
Before
Instruction
After
Instruction
W2 6889 W2 6889
W15 1566 W15 1568
Data 1566 0000 Data 1566 6889
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