English
Language : 

PIC18F4539 Datasheet, PDF (242/322 Pages) Microchip Technology – Enhanced FLASH Microcontrollers with Single Phase Induction Motor Control Kernel
PIC18FXX39
POP
Pop Top of Return Stack
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
[ label ] POP
None
(TOS) → bit bucket
None
0000 0000 0000 0110
The TOS value is pulled off the
return stack and is discarded. The
TOS value then becomes the previ-
ous value that was pushed onto the
return stack.
This instruction is provided to
enable the user to properly manage
the return stack to incorporate a
software stack.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Decode
No
operation
Q3
POP TOS
value
Q4
No
operation
Example:
POP
GOTO
Before Instruction
TOS
Stack (1 level down)
After Instruction
TOS
PC
NEW
= 0031A2h
= 014332h
= 014332h
= NEW
PUSH
Push Top of Return Stack
Syntax:
[ label ] PUSH
Operands:
None
Operation:
(PC+2) → TOS
Status Affected: None
Encoding:
0000 0000 0000 0101
Description:
The PC+2 is pushed onto the top of
the return stack. The previous TOS
value is pushed down on the stack.
This instruction allows to implement
a software stack by modifying TOS,
and then push it onto the return
stack.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
PUSH PC+2
onto return
stack
No
operation
No
operation
Example:
PUSH
Before Instruction
TOS
PC
After Instruction
PC
TOS
Stack (1 level down)
= 00345Ah
= 000124h
= 000126h
= 000126h
= 00345Ah
DS30485A-page 240
Preliminary
 2002 Microchip Technology Inc.