Product: 0470497025

The author is a very experienced assembly language programmer, and he covers topics in a very organized way so that the reader can fully understand at each step of the way. This is a bit boring for programmers who are familiar with assembly language, even those vastly different from Intel’s, but those readers can skip the first three chapters and skim parts of the others.

The author does a fantastic job of focusing on the most important information needed for assembly language programming. He does not present a comprehensive explanation of every instruction, but instead explains each type of instruction and the most used instructions. He covers the use of tools including debuggers and make, and explains how to interface with C programs and how to make Linux kernel calls. After reading each chapter, I was able to use references available on the Internet to find any information that wasn’t in the book, such as a comprehensive list of kernel calls and Intel assembly language instructions.

The instructions given in the book for setting up the tools are for Ubuntu, but yum works well on Fedora:
yum install unzip bless nasm make gcc kdbg insight kdesdk kdebase

One problem with the book is that it sticks to 32-bit assembly language and doesn’t explain what differs on 64-bit systems. I found that I had to change nasm’s output format from elf to elf64 (-f elf64) and use the 64-bit registers (rax, rbx, rbp, etc.) The book describes pushad and popad to push and pop all general purpose registers, but these do not work with the 64-bit registers. Indicating that a memory reference is 64 bits is done with qword. I couldn’t output command line arguments as set up by the Linux runtime without copying them into a different buffer.

On 64-bit Linux, the glibc calling conventions are completely different than those described in the book. I was able to figure out how to call printf by writing a C program and disassembling it with objdump, which I found more readable then gcc’s assembly listing. The glibc calling convention for 64-bit is that the arguments are passed in registers, with the first argument in rdi, second in rsi, third in rdx, and fourth in rcx; also the rax register must be set to zero for variable-argument functions. The registers rbx, rbp, rsp, r12, r13, 14, and 15 must be saved by the called function.

The fact that I was able to program on a 64-bit system even though the book doesn’t cover 64-bit systems is a testament to how well the author covers the basics. Instead of trying to provide every little piece of information an assembly language programmer may need, he provides clear explanations of the basics so that the reader can understand enough to look up any additional information needed. I recommend this book over all others for programmers who want to learn Intel assembly language.
Rating: 5
0470497025
Count: 13