# Assembly: Access and Store information in Memory

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

![](https://1274781047-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M13JlZNu0b_edmxHTQk%2F-M4bw7Jrkcz299vTs7JQ%2F-M4bwUm3qH5YYvwr6uk3%2Fimage.png?alt=media\&token=69554057-c261-4a23-a129-8946e6e82315)

### Operand forms in X86-64

![](https://1274781047-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M13JlZNu0b_edmxHTQk%2F-M4bw7Jrkcz299vTs7JQ%2F-M4bwhYhPb_JCJXb59O9%2Fimage.png?alt=media\&token=a6f4296c-f315-4879-b997-c41e10a996d1)

`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

![](https://1274781047-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M13JlZNu0b_edmxHTQk%2F-M4bw7Jrkcz299vTs7JQ%2F-M4bwlJ_s74xG_zSNA_w%2Fimage.png?alt=media\&token=39120d42-9d5c-4a6e-bc33-6b4fcd82dd47)

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).
