mirror of
https://github.com/pkivolowitz/asm_book.git
synced 2026-06-25 00:16:44 +08:00
typo found by Katie
This commit is contained in:
parent
e7a99b1072
commit
372a2598f5
2 changed files with 22 additions and 16 deletions
|
|
@ -67,13 +67,18 @@ ram: .quad 0xFFFFFFFFFFFFFFFF // 14
|
|||
// 17
|
||||
```
|
||||
|
||||
`Line 14` puts an identifiable pattern into 8 bytes of RAM and gives them the symbol `ram`.
|
||||
`Line 14` puts an identifiable pattern into 8 bytes of RAM and gives
|
||||
them the symbol `ram`.
|
||||
|
||||
`Line 6` gets the address of these bytes into `x1`.
|
||||
|
||||
The next four lines put zeros into that memory using progressively wider store instructions.
|
||||
The next four lines put zeros into that memory using progressively wider
|
||||
store instructions.
|
||||
|
||||
The following is a `gdb` session running the above program. Line numbers have been added to assist with the description of the session. Rather than describe all after a wall of text, descriptions will be provided inline.
|
||||
The following is a `gdb` session running the above program. Line numbers
|
||||
have been added to assist with the description of the session. Rather
|
||||
than describe all after a wall of text, descriptions will be provided
|
||||
inline.
|
||||
|
||||
```text
|
||||
(gdb) b main // 1
|
||||
|
|
@ -164,7 +169,8 @@ Adding the `g` (for `g`iant) we can see all 8 bytes.
|
|||
0xaaaaaaab1010: 0xffffffffffffff00 // 29
|
||||
```
|
||||
|
||||
We just did a `strb` and looking at memory, we see one byte's worth of zeros.
|
||||
We just did a `strb` and looking at memory, we see one byte's worth of
|
||||
zeros.
|
||||
|
||||
*Note: this brings up an interesting question... which byte is actually
|
||||
sitting at the address of `ram`? We will have to look into this more
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in a new issue