SX Embedded Controller Instruction

PopSTAT (DW $04D)

Description: Pop the contents of W from the "STATstack"
Operation: W = STATstack[SSP--]
Flags affected: ?
Registers affected: W
Sources referenced: STATstack
Cycles: 1
Opcode: $04D
Details: Secret Instructions Page
Microchip PIC syntax: n/a
Notes:

The STATstack is only two levels deep and is used by both the interrupt and the debug system. If you don't set a breakpoint or happen to break into debug while in an ISR, you can use one level without concern. If you don't use interrupts or debug, you can use both levels.

To use this instruction, first define the following macro.

PopSTAT macro
 DW $04D
 endm