|
PIC18F2331_07 Datasheet, PDF (320/400 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High Performance PWM and A/D | |||
|
◁ |
PIC18F2331/2431/4331/4431
POP
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Pop Top of Return Stack
[ 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 previous 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.
1
1
Q2
No
operation
Q3
POP TOS
value
Q4
No
operation
Example:
POP
GOTO
Before Instruction
TOS
Stack (1 level down)
NEW
= 0x0031A2
= 0x014332
After Instruction
TOS
PC
= 0x014332
= 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
Decode
Q2
PUSH
PC + 2 onto
return stack
Q3
No
operation
Q4
No
operation
Example:
PUSH
Before Instruction
TOS
PC
= 0x00345A
= 0x000124
After Instruction
PC
TOS
Stack (1 level down)
= 0x000126
= 0x000126
= 0x00345A
DS39616C-page 318
Preliminary
© 2007 Microchip Technology Inc.
|
▷ |