Register Names: A, B, C, D, E, F, H, L
Register Pair Names: AF, BC, DE, HL, IX, IY, SP, AF'
Condition Code Flags: C, NC, Z, NZ, M, P, PE, PO
REPRESENTATION OF NUMBER BASES
Another assembler feature present on all assemblers is the ability
to convert from one number base to the other. This means that argu-
ments for instructions may be specified in the most convenient base.
The ADD A,N instruction, for example, adds an 8-bit immediate
value to the contents of the A register. Binary, decimal, or hexadeci-
mal values of N may be specified by a suffix of B, no suffix, or H to
enable specifying any of the three number 'bases: "ADD A,100",
"ADD A,64H", and "ADD A,01100100B" all amount to the same
thing, adding 10010 to the contents of the A register. These three
suffixes will be used in the examples of Section II, although the for-
mats actually used in a particular Z-80 assembler undoubtedly will
be different.
EXPRESSION EVALUATION
Most assemblers have limited expression capability. Expressions
may consist of symbolic and literal data and in more sophisticated
assemblers, absolute and relocatable symbols. Expression operators
allow addition, subtraction, multiplication, and in some cases, divi-
sion and shifting. The operators are usually represented by predict-
able symbols, such as "+", - "', and "/" for addition, subtraction,
multiplication, and division. Elaborate expressions find little use in
assembly language programs and in some cases may overpower the
assembler, but simpler expressions may be used to assemble the
length of a table, calculate system parameters, and create fields
within data words. Examples will be given in this and other chapters.
PSEUDO-OPERATIONS
In each source line, the portion responsible for generation of the
instruction operation is the op code. There are some assembler oper-
ation mnemonics, however, that do not generate machine-language
instructions but, rather, inform the assembler of special actions to be
taken. These operation mnemonics are called pseudo-ops, since they
are not truly operation codes that represent valid machine-language
instructions. The pseudo-ops discussed here are similar to those in
all assemblers. As they are shown, the parentheses represent an op-
tional label.
141
Need help?
Do you have a question about the Z80 and is the answer not in the manual?
Questions and answers