CHAPTER 9
Z-80 Assembler
The previous section described the hardware aspects of the Z-80,
including the inherent instruction set of the microprocessor. Section
II describes how to use that instruction set efficiently to build sets of
instructions to perform software functions such as multiplication,
division, double and multiple-precision arithmetic, and table and
string manipulation. To facilitate the writing of software programs,
an assembler program is employed. The assembler provides an easy
way to automatically assemble machine language instructions from
a higher-level symbolic assembly language.
MACHINE LANGUAGE
Machine language is the most rudimentary form of any program.
It consists of the actual machine language operation codes and oper-
ands necessary to implement the instructions of the program, ex-
pressed in binary or hexadecimal numbers. Suppose, for example,
that a short program is required to add the numbers from one to ten.
An extremely inefficient way to perform this task is shown below.
XOR A
ADD A,1
ADD A,2
ADD A,3
ADD A,4
ADD A,5
ADD A,6
ADD A,7
ADD A,8
ADD A,9
ADD A,10
133
Need help?
Do you have a question about the Z80 and is the answer not in the manual?
Questions and answers