|0Bh||BT$PPRG||push/pop general word variables|
|Input||- none -|
|Output||- none -|
This system service routine will push or pop the seven variables UTW_R0 to UTW_R6 on the machine stack.
This system service must be followed by a control byte which contains the instructions for the service. Execution of code continues after the control byte.
The format of the control byte is as follows:
Thus if the byte value is $5 then UTW_R2 and UTW_R0 will be pushed.
When pushing, the higher addressed variables are pushed first and when popping, the lower address variables are popped first. Thus if UTW_R5 and UTW_R2 are pushed and UTW_R2 and UTW_R1 are popped then UTW_R1 will get the old value of UTW_R2 and UTW_R2 will get the old value of UTW_R5.
NOTE: no check is made to ensure that there is room on the machine stack to take all the variables pushed.
OS BT$PPRG ; PUSH UTW_R0 DB 1 ; INSTRUCTION BYTE TO BT$PPRG ; CAN NOW USE UTW_R0 OS BT$PPRG ; POP UTW_R0 DB 81h ; INSTRUCTION BYTE TO BT$PPRG
|Errors||- none -|