Push/Pop Functions
Pushxx() pushes the assigned value onto the Stack.
Popxx() pops the top value from the Stack.
Syntax
- Push8/PushByte( value as uint8 )
- Push16( value as uint16 )
- Push24( value as uint24 )
- Push32( value as uint32 )
- 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()