Introduction to 64 Bit Intel Assembly Language Programming

Ray Seyfarth

This book is printed by CreateSpace.com and can be purchased from them at https://www.createspace.com/3651611 . It is available at alternative places now by using Amazon's search facility. You can search for "64 bit assembly" and find it fairly early in the list.

Several sites offer it for slightly less than CreateSpace. I have made several orders so far from CreateSpace and they seem to be quite efficient. This is a "print on demand" book and you can get a book delivered quite quickly from CreateSpace for a little extra money.

I've given up on turning it into an eBook for now. It's too hard, the resolution is too small and formats impact quality.

This web site contains a short discussion of the textbook, PDF slides for presentations, source code files and errata.

About the book

This book is an introduction to assembly language programming for the x86-64 architecture of CPUs like the Intel Core processors and the AMD Athlon and Opteron processors. While assembly language is no longer widely used in general purpose programming, it is still used to produce maximum efficiency in core functions in scientific computing and in other applications where maximum efficiency is needed. It is also used to perform some functions which cannot be handled in a high-level language.

The goal of this book is to teach general principles of assembly language programming. It targets people with some experience in programming in a high level language (ideally C or C++), but with no prior exposure to assembly language.

The primary goal of this text is to learn how to write functions callable from C or C++ programs. This focus should give the reader an increased understanding of how a compiler implements a high level language. This understanding will be of lasting benefit in using high level languages.

A secondary goal of this text is to introduce the reader to using SSE and AVX instructions. The coming trend is for the size of SIMD registers to increase and it generally requires assembly language to take advantage of the SIMD capabilities.

PDF slides for presentation

Source code

The source code is distributed as a a gzipped tar file. After downloading it you can untar it using "tar xvzf src.tgz". Then you should be able to enter any of the chapters like "src/ch07" and use "make" to build the programs.

Alternatively you can build all the programs in all the directories using "make" from the "src" directory.

Errata