gram, necessitating recalculating addresses where they are used in
the program.
THE ASSEMBLY PROCESS
Because of the inherent limitations of manual assembly, all mi-
crocomputer manufacturers offer an assembler program to auto-
matically perform the machine-language function from symbolic
assembly language. Many times the assembler may be run on the
microcomputer itself. In this case, the assembler is a resident as-
sembler. In a few cases, the assembler must be run on another com-
puter, typically an IBM 360/370 configuration. In the latter case,
the assembler is a cross-assembler. In either case, the assembler
quickly assembles programs written in Z-80 or other source assembly
languages, producing an object module representing the machine
code, and a listing of the program in both assembly and machine
language form. A few of the features that an assembler provides are:
1. Symbolic representation of locations, operation codes, and
arguments
2. The ability to intermix comments with the symbolic form of
the instruction
3. Automatic assembly of forward and backward references to
symbolic locations
4. Automatic representation of various number bases
5. Expression evaluation
6. Pseudo-operations or nongenerative assembler instructions
that define locations, equate symbols, reserve memory, and
other convenient features
ASSEMBLY FORMAT
The mnemonic representation of instructions have been used
throughout this text. They are simply a convenient way to write
down the instruction as it is much simpler to write "ADD A,B" than
to write "add the contents of the B register to the contents of the A
register." The mnemonics used for the Z-80 in this text closely follow
the ones used by Zilog. There are some slight differences in repre-
sentation of addressing types. The tables in Chapter 5 or Appendix
C list all instruction mnemonics and the possible addressing formats.
Other microcomputer manufacturers described in this book may use
somewhat different mnemonics in their documentation for their
products.
The standard assembly-language format used in this book is
shown in Fig. 9-3. There are four columns, the label column, the
137
Need help?
Do you have a question about the Z80 and is the answer not in the manual?