i64.sub
Pops two i64 values off the stack, subtracts the second value from the first, and then pushes the result back on to the stack. Make sure you push the values onto the stack in the correct order otherwise you will be subtracting the wrong way round.
$result = $first - $second

Syntax

i64.sub

Stack In

i64 The first value to be subtract from.
i64 The second value to subtract by.

Stack Out

i64 The result of subtracting the second value from the first.

Example

;; Push the i64 value 101 onto the stack
i64.const 101

;; Push the i64 value 42 onto the stack
i64.const 42

;; Pop the two i64 values off the stack, subtract the second value
;; from the first and push the result back onto the stack
i64.sub

;; The stack contains an i64 value of 59