Skip to content

Several minor issues collection for section_1 #33

@Atcold

Description

@Atcold

I've encountered several issues when going over the first few chapters of your book.

  • There are no instructions on how to compile .cpp files (the book mentions clang but clang++ needs to be used instead).
  • Many code assembly blocks start with ```text instead of ```asm.
  • section_1/hello_world/v3.cpp -> section_1/hello_world/v3.c.
  • section_1/if doesn't have a macOS version (section_1/hello_world introduces macros that here are not used).
  • v6.S uses PUSH_P and PUSH_R, which are not explained. Maybe for pushing a Pair of registers or a single Register to the stack.
  • v6.S moves sp to x29 for no clear reason.
  • v6.S uses 1: and 2: labels and 2f and 1b, which are only explained in a later chapter.
  • hello_world/README.md says that for (; argv; argv++) has the "added benefit that the increment of the argv pointer is not a side effect" which is not true. After the loop, argv value is no longer the initial one.
  • xzr in mov x0, xzr in section_1/hello_world/v5.s has never been defined (and it's less readable than mov x0, #0).
  • section_1/structs/alignment.md talks about a hex dump, but there are no instructions about how to do such a thing. So, it's impossible to follow along what the book is explaining.
  • I don't know how to compile section_1/structs/test01.c for inspecting the binary.

I didn't want to create a separate issue for each item.
I hope you do appreciate this kind of feedback.

P.S. I've pushed some of these changes to my fork of your repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions