1
SWAP
Nunuhara Cabbage edited this page 2019-11-05 18:11:03 -08:00

SWAP

Instruction Arguments

None.

Stack Arguments

int32 value1 - The first value to swap
int32 value2 - The second value to swap

Description

Swap the top two values on the stack.

Example

PUSH 0x1 ; stack: [1]
PUSH 0x2 ; stack: [1, 2]
SWAP     ; stack: [2, 1]