Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/webassembly/reference/memory/store/index.md
6532 views
---
title: Store slug: WebAssembly/Reference/Memory/Store
---

{{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

;; the offset in memory where to store the number i32.const 0 ;; the number to store i32.const 20 ;; store 20 at position 0 i32.store
InstructionBinary opcode
i32.store0x36
i64.store0x37
f32.store0x38
f64.store0x39
i32.store80x3a
i32.store160x3b
i64.store80x3c
i64.store160x3d
i64.store320x3e