Review of ‘Programming with 64bit ARM assembly language’ book
In my pursuit towards better understanding of low-level concepts, I’ve finally reached the bottom of it. How, you may ask? By diving into assembly language. Nowadays, I think that there’s no lower level than this. Obviously, I did not go there blindly. I was sure, that trying to jump right into modern x64 architecture will knock me off my feet right away. Therefore, I’ve started small (I think that’s my motto for this blog).
Every CPU architecture, can be described as one of the two – CISC and RISC. The latter stands for Reduced Instruction Set Computing, and is exactly what it says. A computer that does not have all the robustness and variety of instructions/operations that can be performed by its core assembly. You might argue, that they’re still fully-operating computers, and you would be right! However, as I skimmed through opinions and guidelines how to start with assembly, this was the common tip. Start with the simple architecture. I could achieve that with emulators of legacy CPUs. Although it did not sound fun. In order to get some, I’ve ordered brand new Raspberry Pi 4, and decided to give it a shot with RISC ARM CPU.
The last thing to do, was to find a proper guide. After googling around I’ve settled on the ‘Programming with 64bit ARM assembly language’ book by Stephen Smith. I was convinced by the concise table of context, label that published it and what is most important – publication date. When it comes to assembly programming, there’s a lot of materials, but often quite dated. I wanted the book to be my guide, not a history teacher. What is more – I’ve never touched assembly before (please remember that I did not study CS), and my goal here was to just get familiar with the registers, bits, instructions and stuff. Having a small computer to play with is fun, but not my main interest.
So how was the book? To start with – I wasn’t disappointed by the quality of the printed version. I did not find any misspellings or formatting issues. The code in the book was easy to read and follow. Chapters are organized in a rational manner, with one topic logically resulting from the previous one. I find the scope the book sufficient, as it covers the basic stuff and provides examples of how to use this knowledge (with both code in the book/GitHub or with exercises to do). Obviously I was creating my ANKI flashcards deck while reading, so it was not a speed read. Although, I think that the book itself could be easily read in two days tops.
So is it all sunshine and rainbows (and unicorns, don’t forget the unicorns)? Unfortunately – no. First thing that I found confusing, was the way, in which author introduced new concepts. As I’ve mentioned before, I was (and probably I still am) completely new to the assembly language. The author quite often introduces new concepts providing code samples (which is obviously great), but besides showing the thing that was just described, it’s usually filled with some additional instructions or concepts. It leaves the reader (I felt that way) in a confused state. Usually, it is a couple of pages more before the author explains new concepts that were already presented in the code. To be honest, it took me two chapters to recognize this pattern, and I’ve applied the policy to read the chapter first, and then reread it with code inspection next. That way worked for me, although it would be nice to be given a heads-up before.
Second problem is related to the feeling I had when I was done reading. How to describe it? Unfulfilled? I think that’s the word. In my opinion, the author has a great amount of knowledge about the topic. Unfortunately, it seems that he can’t change his perspective, and put his mind into the mind of the possible reader (like me). The reader, who has no previous experience with assembly, and therefore would like to be shown a path to follow next. My feeling is, that the book was about to cover basics of assembly programming for ARM for the people somehow familiar with the assembly already, and it did just that.
I think that it would be perfect, if one simple closing chapter was added. The chapter describing actual, real-world projects done in assembly for ARM. Maybe recommended books/links/communities/resources to follow next, in order to make progress in the area. With the addition of such chapter, I won’t hesitate to call the book perfect. However, don’t let my feelings cloud the fact, that it’s still a worthy book to read. Just note my opinions, and go ahead, that won’t be a time wasted.
September 2021 Monthly Summary – Bare.Metal.Dev
[…] You may wonder, why haven’t I created any notes (similar to the Tanenbaum’s book)? Well, that’s a longer story, which I plan to elaborate on in a separate post. Although, the idea was to use the knowledge I’ve gained recently, from the Experts Incubator course. To cut to the point – it’s a course about learning process, how to do this in the most efficient way, avoid pitfalls and usual problems when trying to learn something new. The main idea is – repetitive learning (e.g. via flashcards) combined with deliberate practice, is a way to go. Therefore, I’ve decided to give it a try, and starting with assembly book, there’s a full ANKI flashcard waiting for you on my GitHub. Everything I would usually put in a notes form, right now is available for you to start learning right away! I’ve been doing it from the beginning of the month (every day), and it works! Just works! I recommend that you also give it a try! Obviously, I couldn’t resist to write the review of the book. […]