SSWAP swaps the top of the stack, with the next-to-top level.
Stack before SSWAP:
High Bank |
Low Bank |
|
 |
A |
B |
Top |
C |
D |
Next |
 |
Stack after SSWAP:
High Bank |
Low Bank |
|
 |
C |
D |
Top |
A |
B |
Next |
 |
Note: A, B, C, D denote TRUE or FALSE.
Takes 1 cycles to execute.
Example: SSWAP
STKC
----
SWP
No exceptions.
IPUSHEQ 255 3 0xa 0xb !! Pushes on both banks of the stack integer
!! condition for equality
IPUSHEQ 255 3 0xc 0xd !! Pushes on both banks of the stack integer
!! condition for equality
SSWAP !! Performs the SSWAP operation
!! as described above