swap
Stack
Before
|
After
|
| word1
|
word2
|
| word2
|
word1
|
| ...
|
...
|
Swaps the top two single-word items on the stack. word1/word2 cannot belong to a long or double.
Bytecode
Type
Notes
Description
u1
swap
opcode = 0x5F (95)
There is no swap2, although you could use:
dup2_x2
pop2
to
achieve the same effect.