memory.copy
Copy bytes within or between memories.
bulk-memory0xFC 0x0A
Syntax
memory.copy
Stack Effect
[dst i32, src i32, len i32] -> []Opcode
- Hex
0xFC 0x0A- Decimal
252 10- Bytes
[0xfc, 0x0a]- Prefix
0xFCbulk-memory / saturating conversions / table extension space- Encoding
0xFC 0x0A <memidx:u32-leb128> <memidx:u32-leb128>- Immediates
memidx:u32-leb128— memory index (0 unless multi-memory)memidx:u32-leb128— memory index (0 unless multi-memory)
- Category
- memory
- Proposal
- bulk-memory
Browser Support
Feature-detect runtime support before executing examples.
Validation Rules
- Operands and result types must match the instruction signature.
- The instruction must appear in a valid structured control context.
Common Mistakes
- Using the instruction with the wrong operand type.
- Forgetting that WAT validation is stack-typed.
(func $example
;; memory.copy example
)