PHP PHP Push processor status on stack PHP
Operation: P to Stack N V - B D I Z C
. . . . . . . .
+----------------+-----------------------+---------+---------+----------+
| Addressing Mode| Assembly Language Form| OP CODE |No. Bytes|No. Cycles|
+----------------+-----------------------+---------+---------+----------+
| Implied/Stack | PHP | $08 | 1 | 3 |
+----------------+-----------------------+---------+---------+----------+
What it does: Pulls the top byte off the stack and puts it into the Accumulator.
Major uses: To restore a number which was temporarily stored on top of the stack (with the PHA instruction). It is the opposite action of PHA. Note that PLA does affect the N and Z flags. Each PHA must be matched by a corresponding PLA if the stack is to correctly maintain RTS addresses, which is the main purpose of the stack.