spelling and moving around chapters

This commit is contained in:
Perry Kivolowitz 2022-06-10 02:55:31 -05:00
parent eb80d99d37
commit 45db9bbb07
7 changed files with 50 additions and 35 deletions

46
.vscode/settings.json vendored
View file

@ -1,21 +1,35 @@
{
"cSpell.words": [
"AARCH",
"argc",
"argv",
"asciz",
"cout",
"csel",
"Formulus",
"iostream",
"memcpy",
"pseudocode",
"stringstream",
"strncpy",
"struct",
"structs"
],
"AARCH",
"argc",
"argv",
"asciz",
"cbnz",
"cout",
"csel",
"fizzbuzz",
"fname",
"Formulus",
"funcs",
"iostream",
"ldrb",
"ldrh",
"lname",
"memcpy",
"pimm",
"pseudocode",
"regs",
"simm",
"smaddl",
"stringstream",
"strncpy",
"struct",
"structs"
],
"markdownlint.config": {
"MD024":false
}
},
"cSpell.ignoreWords": [
"foov"
]
}

View file

@ -45,15 +45,16 @@ the 64 bit ARM Instruction Set Architecture (ISA).
| 1 | [Hello World](./section_1/hello_world/README.md) |
| 2 | [If Statements](./section_1/if/README.md) |
| 3 | Loops |
| 3 a | [   While Loops](./section_1/while/README.md) |
| 3 b | [   For Loops](./section_1/for/README.md) |
| 3 c | [   Implementing Continue](./section_1/for/README.md#implementing-a-continue)
| 3 d | [   Implementing Break](./section_1/for/README.md#implementing-a-break)
| 4 | [Interlude - Registers](./section_1/regs/README.md) |
| 5 | [Interlude - Load and Store](./section_1/regs/ldr.md) |
| 6 | [Calling and Returning From Functions](./section_1/funcs/README.md) |
| 7 | [Passing Parameters To Functions](./section_1/funcs/README2.md) |
| 8 | [FizzBuzz - a Complete Program](./section_1/fizzbuzz/README.md) |
| 3 a | [....While Loops](./section_1/while/README.md) |
| 3 b | [....For Loops](./section_1/for/README.md) |
| 3 c | [....Implementing Continue](./section_1/for/README.md#implementing-a-continue)
| 3 d | [....Implementing Break](./section_1/for/README.md#implementing-a-break)
| 4 | Interludes |
| 4 a | [....Registers](./section_1/regs/README.md) |
| 4 b | [....Load and Store](./section_1/regs/ldr.md) |
| 5 | [Calling and Returning From Functions](./section_1/funcs/README.md) |
| 6 | [Passing Parameters To Functions](./section_1/funcs/README2.md) |
| 7 | [FizzBuzz - a Complete Program](./section_1/fizzbuzz/README.md) |
## Section 2 - Stuff

View file

@ -1,4 +1,4 @@
# Section 1 / Chapter 8 / FizzBuzz
# Section 1 / Chapter 7 / FizzBuzz
In this chapter we build the classic tech interview question: FizzBuzz.

View file

@ -1,4 +1,4 @@
# Section 1 / Chapter 6 / Calling and Returning From Functions
# Section 1 / Chapter 5 / Calling and Returning From Functions
Calling functions, passing parameters to them and receiving back return values is basic to using `C` and and `C++`. Calling methods (which are functions connected to classes) is similar but with enough differences to warrant its own discussion to be provided later in the chapter on [structs](../struct/structs.md).

View file

@ -1,4 +1,4 @@
# Section 1 / Chapter 7 / Passing Parameters To Functions
# Section 1 / Chapter 6 / Passing Parameters To Functions
Up to 8 parameters can be passed directly via registers. Each parameter can be up to the size of an address, long or double (8 bytes). If you need to pass more than 8 parameters or you need to pass parameters which are larger than 8 bytes or are `structs`, you would use a different technique described later.

View file

@ -1,4 +1,4 @@
# Section 1 / Chapter 4 / Interlude - Registers
# Section 1 / Chapter 4 a / Interlude - Registers
We have discussed and used registers in the previous chapters without explanation. This chapter
introduces the concept of registers and explains why registers are critical.

View file

@ -1,4 +1,4 @@
# Section 1 / Chapter 5 / Interlude - Load and Store
# Section 1 / Chapter 4 b / Interlude - Load and Store
In this section we will review the `ldr` and `str` families of instructions.
@ -487,7 +487,7 @@ of 8.
smaddl x4, w1, w5, x3 // initialize end_ptr // 19
```
`w1` (the length) will be multipled by `w5` (the size of each array member), added to `x3` (the base address of the array) and the result will be placed into `x4`. This assembly language instruction implements this in C:
`w1` (the length) will be multiplied by `w5` (the size of each array member), added to `x3` (the base address of the array) and the result will be placed into `x4`. This assembly language instruction implements this in C:
```c
struct Person * end_ptr = people + length; /* 20 */