Push/Pop Functions

Pushxx() pushes the assigned value onto the Stack.
Popxx() pops the top value from the Stack.

Syntax

  • uint8 = Pop8/PopByte()
  • uint16 = Pop16()
  • uint24 = Pop24()
  • uint32 = Pop32()

Important!

The function is the same as the machine command Push/Pop. After pushing bytes onto the stack you MUST pop the same number of bytes in the same level of code prior to exiting.

Example

PushByte(avr.SREG)
cli
MyFunction(1,2,3)
avr.SREG = PopByte()