Path: blob/main/files/en-us/webassembly/reference/memory/store/index.md
6532 views
------{{WebAssemblySidebar}}
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.
{{EmbedInteractiveExample("pages/wat/store.html", "tabbed-taller")}}
Syntax
| Instruction | Binary opcode |
|---|---|
i32.store | 0x36 |
i64.store | 0x37 |
f32.store | 0x38 |
f64.store | 0x39 |
i32.store8 | 0x3a |
i32.store16 | 0x3b |
i64.store8 | 0x3c |
i64.store16 | 0x3d |
i64.store32 | 0x3e |