Covering the design and implementation of assemblers and loaders, this comprehensive book opens with an introduction to one-pass and two-pass assemblers. Important concepts such as absolute and relocatable object files are discussed, as are assembler features such as local labels and multiple location counters. The format, meaning and implementation of many directives are look at in detail, and the important topics of macros and conditional assembly are introduced. The latter part of the book is concerned with the listing file, the properties of disassemblers and a look at three special types of assemblers. The book closes with a chapter on loaders and includes a very detailed example of the basic operation of a one-pass linking loader, together with other features and concepts such as dynamic loading, bootstrap loaders, and overlays. Lots of (solved) exercises are included throughout, and at the end of each chapter there are review problems and projects.

This book differs from the typical assembler text in that it is not a programming manual, and it is not concerned with any specific assembler language. Instead it concentrates on the design and implementation of assemblers and loaders. It assumes that the reader has some knowledge of computers and programming, and it aims to explain how assemblers and loaders work. Most of the discussion is general, and most of the examples are in a hypothetical, simple, assembler language. Certain examples are in the assembler languages of actual machines, and those are always specified. Some good references for specific assembler languages are [5, 6, 7, 13, 26, 27, 30, 31, 32, 35, 37, 39, 101].

This work has its origins at a point, a few years ago, when my students started complaining about a lack of literature in this field. Since I include assemblers and loaders in classes that I teach every semester, I responded by developing class notes. The notes were an immediate success, and have grown each semester, until I had enough material for an expository paper on the subject. Since I was too busy to polish the paper and submit it, I pretty soon found myself in a situation where the work was too large for a paper. So here it is at last, in the form of a book.

This is mostly a professional book, intended for computer professionals in general, and especially for systems programmers. However, it can be used as a supplementary text in a systems programming or computer organization class at any level.