op code column, the arguments column, and the comments column.
Each representation of a Z-80 instruction must have an operand.
Most instructions have arguments, such as "LD (HL ),R" where
"(HL ),R" are the two arguments. Instructions such as EI or HALT
have no arguments. The label field is optional. When a label is
present, it may be one to six alphabetic or numeric characters, the
first character of which must be alphabetic. The optional comments
COLUMN
NUMBERS-
LABEL
1 6
OP
CODE
78 11
ARGUMENTS
1
3
2
COMMENTS
9
NAME12
LD
(HL) R
THIS IS A SAMPLE SOURCE LINE
NAME13
El
ENABLE INTERRUPTS
JMP
NZ,STOP
0 TO HALT-WAIT FOR INTERRUPT
'-
-
HOLDS OPCODE ARGUMENTS
OPTIONAL OF 2-4 AS REQUIRED
NAME CHAR-
OF 1-6 ACTERS
CHAR-
ACTERS
BLANK BLANK BLANK
OPTIONAL
COMMENTS
Fig. 9-3. Typical Z-80 assembly language format.
column describes the action of the instruction as was shown in Fig.
9-2. The four columns make up an assembly language line. In gen-
eral, the length of assembly language lines has been determined by
the length of lines on the input devices such as teletypewriters and
punched-card readers. In actual practice, as in the assemblers dis-
cussed in the manufacturers section of this book, Section III, the
end of the line is represented by a carriage return, line-feed code,
or similar device-oriented condition.
In general, each assembly language line (or source line) repre-
sents the complete set of information about one Z-80 instruction.
Each line will generate from one to four bytes representing a Z-80
instruction. One of the several exceptions to this rule is a comment
line, which is originated with a semicolon and is nongenerative; it
generates no machine-language code but serves for reference only.
138
Need help?
Do you have a question about the Z80 and is the answer not in the manual?