i32
value off the stack, checks to see if it is zero, and then
pushes the result back on to the stack.
i32.eqz
i32 | The value to be checked. |
i32 | The result of the check. If the value is 0 then the result will be 1. If the value is anything else then the result will be 0. |
;; Push the i32 value 101 onto the stack i32.const 101 ;; Pop the i32 value off the stack, check if it is zero and ;; push the result back onto the stack i32.eqz ;; The stack contains an i32 value of 0 (not zero)
;; Push the i32 value 0 onto the stack i32.const 0 ;; Pop the i32 value off the stack, check if it is zero and ;; push the result back onto the stack i32.eqz ;; The stack contains an i32 value of 1 (is zero)