What Goes on Deep Inside Your Computer?
The Art of Assembly Language (2nd edition) started as a book used by Randall Hyde to teach a course on assembly language in the late 1980s since then it grew into the book released in 1996 and the second edition published in 2009. The book teaches readers the principals of programming in assembler using Randall’s High-Level Assembler (HLA). HLA makes writing common program elements like loops, conditional statements and structures less time consuming than hand-writing them, as is done in with regular assemblers.
These days C is about as low-level as most people go. Back in the 80s though, most games and a fair number of applications were written entirely, or at least speed-critical parts, where commonly written in assembler. Today, however, most compilers can generate at least as good code as a competent programmer can create. If you want an example, have a look at what Google’s Closure compiler does to your JavaScript code.
The book initially started off in 1989 as a book for students of a course on assembler language the author was teaching and evolved into the first edition in 2003. This updated version was released in 2010. While assembler language is mostly used in the lower reaches of computer platforms in areas such as device drivers, it remains the fact that everything else in modern operating systems is built on top of it. While modern high-level languages have abstracted away much of the need to know how a program is executed, if for curiosity only (and what programmer is not?), it’s probably good to know what is going on in the lower reaches of their computers.
In the book, readers will learn how computers are programmed at the assembler level, using the HLA and how to write software with it in assembler. The book follows a logical course, starting with first principals about memory storage, variables to procedure calls and arithmetic before getting into the more advanced features the HLA provides for. The book itself is filled with code examples. For those of us who might have last programmed in assembler in 1989, most of it will feel familiar.
Using the High-Level Assembler begins at the start of the book and is built-on as the reader progresses. Compared to high-level languages, assembler is very simple and hasn’t changed a lot in decades. You are still copying data or manipulating data and storing into memory addresses, but that’s also the problem with it: with assembler that how everything is done, hence it’s a lot of work translating a lot of the higher-level ideas down into assembler. What Randall Hyde’s HLA brings to assembler is a C-like syntax. Together with regular assembler syntax in a way that goes beyond macro assembler, so that readers more familiar with high-level languages will feel more comfortable – and less typing is better for all.
In short, there aren’t any other current books on programming in assembler that I’m aware of, but this book is readable, so if this is it, then this pretty good. It will teach programmers right from first principals, and by the end of the book, readers will be pretty comfortable writing in programs using HLA and will have a new understanding of how computers operate.