The Art of Assembly Language Programming


Skip the HYPE. Let me read the book (HTML).
PDF version of text.
Zipped Postscript and PDF files
Support Software for "Art of Assembly"

Note:

Zipped PS files require as much as 140 MB to unpack.

The zipped files are arranged as follows:
CH01..CH25.zip, APPND.zip, and fwd.zip contain the individual chapters (postscript) in compressed form. Download these if you have disk space problems or trouble downloading really large files.

The index and table of contents are provided in straight PostScript form (aoaIndex.ps, aoaTOC1.ps, aoaTOC2.ps)

These postscript files probably use only the standard PS fonts, typically palantino, garamond (Adobe Garamond), Helvetica, and a few others.

If you want to grab the whole thing at once, download the PSAOA.zip file. Keep in mind that this file is over 17 MB long and expands to about 120MB. So you will need about 140MB free to unpack everything.

PSLAB.ZIP contains a compressed form of the postscript files for an old version of the lab manual that folded into the text a few years ago. The interesting thing about this lab manual is that it contains a study guide/tutorial that many students have found useful (this study guide did not make its way into the text).

PDFLAB.ZIP and PDFAOA.ZIP contain Adobe Acrobat "PDF" files for the old lab manual and the text book, respectively. Download these if you have and acrobat reader (or don't have a postscript printer).

The "STDLIB.ZIP' file contains the "UCR Standard Library" software to which the text refers. The "AOA.ZIP" file contains the software specific to the Art of Assembly textbook. The "AOAOLD.ZIP" file contains the software for an older version of the text, specifically, it contains the software that the old lab manual (PSLAB.ZIP and PDFLAB.ZIP above) use.

Paper versions are available. They are very expensive (currently about $95 plus shipping). The expense is due to the fact that you are paying the labor costs to have someone stand around and run off the 1,500 pages or so of the text. There has been little interest in a paper copy in the past (probably because if the expense), there will probably be less interest now that Postscript files are available. If there is a strong demand (e.g., to supply University courses) I will arrange with a custom textbook publisher to make hard copies more widely available.


The Legal Stuff

The Art of Assembly Language Programming
Written by Randall Hyde
Copyright 1996, All rights reserved.

This text is copyrighted by Randall L. Hyde. Randall Hyde grants you, an individual, permission to make one (1) hard copy of this document for your own personal use. You may view the document on-line via Randall Hyde's Web Server and you may download electronic copies (HTML or PDF) for your own personal use.

You may not distribute copies of this text in electronic or printed form.

Those wishing to otherwise distribute this document or mirror it on another web site (or other intranet facility) should contact webster@webster.ucr.edu to obtain proper copyright clearances. This policy allows us to ensure that other sites maintain the latest copy of the material. We appreciate your cooperation in this matter.


PLEASE NOTE!

The text is broken down into sections because the chapters are quite long, particularly when you consider all the diagrams that are present. Some of the sections are still a little too long and some people (especially those operating on modems) have troubles downloading the sections. If stuff is missing from a section in the middle of the text, either your internet server (or client) is having problems or our server is overloaded. The material is all there.

Description

The Art of Assembly Language Programming is a textbook on machine organzation and assembly language programming that I have developed for the CS 264 (Assembly Language Programming) at Cal Poly Pomona and CS 13 (Machine Organization and Assembly Language Programming) at UC Riverside.

Why use my own set of notes when there are over a dozen textbooks on this subject? Just ask anyone who has had to learn this material from one of the existing texts :-). Seriously, though, existing texts fall into two categories: those written by computer architects and those written by programmers.

The problem with any text written by an computer architect is that the text is essentially a computer architecture textbook. Machine organization is not computer architecture. It is a small subset of computer architecture. A machine organization course should cover those architectural features of immediate importance to three types of programmers: those who need to write fast and/or short code, those who write compilers (who need to write programs that write short and fast code), and those who will actually spend part of their lifetimes writing assembly language code for a living (a much bigger number than academians will admit).

For some reason, computer architects feel that designing an instruction set for a CPU somehow makes them an expert assembly language programmer. However, the only thing that makes someone an expert assembly language programmer is writing lots of assembly language code. Another necessary condition is that this person has written lots of assembly language code recently. Take a look at several of the MOAL (machine organization and assembly language) texts out there today. Presenting the instruction set and techniques for programming in that instruction set is an afterthought to what is essentially an architecture text. The author often uses the phrase "learning this stuff is unimportant because you will never need to use it anyway." Gee, I'd rather they taught me how to do it and I choose to ignore it if it is truely unnecessary. However, their attitude leaves me in a lurch if I really want to learn assembly language programming. Quite frankly, when I see a text written in this fashion, I lose considerable respect for the author since it tells me they didn't bother learning the subject well enough to write a college textbook on it.

I want to emphasize that these MOAL texts written by computer architects are are not all bad. Many of them are excellent texts on machine organization and (baby) computer architecture. They just don't do justice to the assembly language portion of a MOAL course.

The second class of MOAL textbook is the "Assembly Language Programming" text. These texts often head off in the other direction from those texts written by computer architects. About the only machine organization they describe is numeric representation (binary, hex, etc.) and, possibly, a little bit about instruction encoding. I could almost live with this if these texts as a general rule presented assembly language programming as a true programming discipline. Unfortunately, most ALP (assembly language programming) texts just present the instruction set, directives and pseudo opcodes, and describe how to do a few little tricks (e.g., extended precision arithmetic) in assembly language. Even if someone read and understood the entire text, they would not be particularly prepared to write real-world assembly language programs.

Worse yet, ALP texts generally suffer from another problem -- they often do not make any connection with the rest of the Computer Science program. At least the MOAL texts provide an excellent prerequisite to computer architecture, digital logic, and other courses in a typical Computer Science program. ALP texts generally treat assembly language programming as a subject independent from other subjects.

In fact, there are several subjects that would benefit from having some additional material taught in an ALP text. Subjects include Digital Logic and Computer Systems Design, Computer Architecture, Real Time Programming, Programming Language Design and Implementation, Compiler Design, Operating Systems, and Concurrent Programming. A good ALP text should provide suitable background material (e.g., providing the background for the discussion of topics like atomic operations, task switching, and run time environments).

Given the paucity of appropriate MOAL/ALP texts, I began writing my own text in 1989. At the time I was roundly criticized (by academians) for writing the text around the Intel 8088 microprocessor. "The Intel family is dying and no one will be using it in five years." was the complaint. My attitude was "I don't care, there are millions of PCs that use the 8088 and if I'm going to teach an assembly language, I want to teach one that students might actually use once they get out of school." The fact that Intel and the x86 design would continue to dominate the CPU market essentially forever never even occurred to me at the time. Of course, the 8088 is truly dead. I had to update my notes to include the later processors in the family (including the 80286, 80386, 80486, and Pentium/Pro processors).

The Art of Assembly Language Programming is the result of seven years of labor. I have used this textbook in classes an average of about three times per year. I have made considerable revisions to the text to make this subject easier to comprehend by students. I've added laboratory exercises (in addition to programming projects) to bring it in conformance with the IEEE/ACM guidelines for a Machine Organization and Assembly Language Programming course. Finally, I've spent considerable time making sure this text:

  • Teaches a sufficient amount of machine organization.
  • Teaches assembly language programming as a programming topic (i.e., if a student reads and understands this material, they will know how to write intermediate level assembly language programs).
  • Introduces topics that tie in with other courses in a typical Computer Science Program including digital logic, programming language design and implementation, operating systems, real-time systems, automata theory, data structures and algorithm analysis, and microcomputer systems design.

    The current version of The Art of Assembly Language Programming is in excess of 1,500 pages long. The only distribution channel currently available for this text is via the Printing and Reprographics Department here at UC Riverside. I will attempt to work out a mechanism whereby interested parties can order a copy from them. Instructors interested in using a Beta version of this text should contact me via email.

    There is also a laboratory/study guide available (for an older version of the text). The lab manual is available in postscript format. Warning: the lab manual has not been proofread, indeed, it hasn't even been spell checked. The lab manual/study guide was abandoned because the exercises took far too long to complete (UCR's labs run three hours, the lab exercises typically required 4-5) and I wanted to get the cost down on the notes. Note that the textbook currently incorporates laboratory exercises so there is no need for a separate lab manual.


    Last Modified: 08:01am , Oct 1 1996