From d99e803796039b7f18e2df4cf48584ad10c73a19 Mon Sep 17 00:00:00 2001 From: Perry Kivolowitz Date: Tue, 7 Jun 2022 15:19:19 -0500 Subject: [PATCH] making markdown lint happier --- section_1/hello_world/README.md | 5 ++--- section_1/if/README.md | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/section_1/hello_world/README.md b/section_1/hello_world/README.md index af828e7..a9aca9a 100644 --- a/section_1/hello_world/README.md +++ b/section_1/hello_world/README.md @@ -65,7 +65,7 @@ There are other reasons to specify a `using namespace` and even some reasons *no `Line 5` is a function declaration declaring `main`. In command line programs (and indeed in many non-command line programs), a function -called `main` is necessary. +called `main` is necessary. In all respects save one, `main` is an ordinary user-written function. What makes `main` special is its name @@ -201,7 +201,7 @@ This marks the end of the `while` loop's *body*. The `}` causes a **jump** back to evaluating what is pointed to by argv to see if it is now null (which exits the loop). A synonym for **jump** is **branch** - remember this. -Also remember that braces in a higher level language can mean a branch or jump in +Also remember that braces in a higher level language can mean a branch or jump in assembly language. A brace in a higher level language can also mean a *target* or landing place for a jump / branch elsewhere in the code. @@ -463,7 +463,6 @@ That is, subtract 8 from the stack pointer and copy `x21` to that location. Then **The stack pointer in ARM V8 can only be manipulated in multiples of 16.** - ### Line 4 When a function is passed parameters, up to 8 of them can be found in the first 8 scratch registers (`x0` through `x7`). For example, recall: diff --git a/section_1/if/README.md b/section_1/if/README.md index a2ebcde..082ad4a 100644 --- a/section_1/if/README.md +++ b/section_1/if/README.md @@ -20,7 +20,6 @@ For simplicity, let us assume that both `a` and `b` are defined as language. If `a` or `b` are not pointers and are not longs, `w` registers would sneak in somewhere. See [Interlude - Registers](./section_1/regs/README.md) for more information. - ## `if` in `AARCH64` Here is the above `if` statement rendered into ARM V8 assembly language: @@ -67,9 +66,10 @@ Handling of `>=` and `<=` follow from the above. Using the state of the condition bits (which are set by the faux subtraction of `x1` from `x0` performed by `cmp`), branch (a jump or goto) if the previous computation shows `less than or equal to` zero. Notice -the use of the *opposite* condition as found in the `C` code. This use of the opposite condition is not a hard and fast rule. In this case, it allows the body of the `if` +the use of the *opposite* condition as found in the `C` code. +This use of the opposite condition is not a hard and fast rule. In this case, it allows the body of the `if` statement to be written directly below the branch so as to emulate the skipping of -the code block contained between the `if` statement's braces. +the code block contained between the `if` statement's braces. This is a matter of style. @@ -211,7 +211,7 @@ allow a branch to that code block, such as the beginning of an `else`. as the equivalent `if` statement in a high level language. Answer: False - it is a matter of style but you may be able to -save an instruction or two by doing so. +save an instruction or two by doing so. ### 2