# Assembly: Access and Store information in Memory

### Sizes of C data types in X86-64

![](/files/-M4bwUm3qH5YYvwr6uk3)

### Operand forms in X86-64

![](/files/-M4bwhYhPb_JCJXb59O9)

`M[Addr]` means a reference to the value stored in memory starting at address `Addr`.

The memory of address `Addr` could come from user space, CPU and MLU works together to get the physical page (PA) from Page Table, then access the PA in RAM.

### RISC-V Integer Instructions

![](/files/-M4bwlJ_s74xG_zSNA_w)

The operand forms is basically the same. `lb D, S` `sb S, D`

Example: `sd ra,40(sp)` Save 8 bytes (double) from `ra` register to memory address of (sp + 40).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xiayingp.gitbook.io/build_a_os/hardware-device-assembly/assembly-access-and-store-information-in-memory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
