The store instructions, are used to store a number in memory.

For the integer numbers, you can also store a wide typed number as a narrower number in memory, e.g. store a 32-bit number in an 8-bit slot (i32.store8). If the number doesn't fit in the narrower number type it will wrap.

Try it


;; the offset in memory where to store the number
i32.const 0

;; the number to store
i32.const 20

;; store 20 at position 0
Instruction Binary opcode 0x36 0x37 0x38 0x39
i32.store8 0x3a
i32.store16 0x3b
i64.store8 0x3c
i64.store16 0x3d
i64.store32 0x3e