# `EEVM.Interpreter.Instructions.StackMemoryStorage.MemoryOps`
[🔗](https://github.com/mw2000/eevm/blob/v0.1.0/lib/eevm/interpreter/instructions/stack_memory_storage/memory_ops.ex#L1)

Memory access opcodes: MLOAD, MSTORE, MSTORE8, MSIZE, and MCOPY.

These opcodes read from and write to EVM linear memory. Memory is byte-addressable
and expands on demand — each expansion incurs a gas cost calculated by `Gas.Memory`.

- **MLOAD** (0x51) — loads a 32-byte word from memory at the given offset.
- **MSTORE** (0x52) — stores a 32-byte word to memory at the given offset.
- **MSTORE8** (0x53) — stores a single byte (lowest byte of value) at the given offset.
- **MSIZE** (0x59) — pushes the current memory size in bytes.
- **MCOPY** (0x5E) — copies a region of memory to another location (EIP-5656).

# `execute`

```elixir
@spec execute(non_neg_integer(), EEVM.Interpreter.MachineState.t()) ::
  {:ok, EEVM.Interpreter.MachineState.t()}
  | {:error, atom(), EEVM.Interpreter.MachineState.t()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
