z80-asm - command-line Z80 CPU assember for Unix and DO$
z80-asm [-wlhcf XX] inputfile[.asm] [startaddress[[:length] :outputfile]
z80-asm [-wlhcf XX] inputfile startaddress[:length]:outputfile ...
z80-asm is a two pass compiler of the Z80 CPU assembly language. It's first
argument is name of an input (source) file. If no sections follow no code is
generated. In the case of exactly one section follows and the inputfile name
ends with .asm
with its leading colon delimiter
and the optional length
may be omitted. Then the output is written to a
file named inputfilename.z80
Generally each section tells the compiler
to save code to file outputfile
from address start address
with len length.
Format of the file is described in z80-file(5).
If an obligate outputfile
is missing compilation is aborted after this
section but error checking of the code is done. If length
compiler saves code from start address to furthest byte stored to memory
All addresses are given decimal in range from 0 to 65535 or hexadecimal in the
range from 0x0000 to 0xffff.
For assembler syntax see section z80-asm(5).
Compiler called with no options or -h
option prints usage. Option
turns on warning messages, when overwriting code in memory. Option
writes a source listing in pass 2 to stdout. Each input line is
prepended by PC, generated machine code and line no of 5 digits. Option
which must be followed by a 2 digit hexadecimal value XX sets the
undefined bytes in gaps created by DEFS and ORG statements to the given fill
value XX. Finally option -c
prints a cross reference listing of the
labels to stdout in case of no errors.
No bugs are known. :-) If you find some, please feel free to send me a
Z80-ASM was written by Brainsoft <firstname.lastname@example.org> and
Achim Flammenkamp <email@example.com>
Copying of this software must be under terms of the GNU General Public License.
There's absolutely no warranty on this software. For more details see file
(c) 1999-2004 Brainsoft
z80-asm(5), z80-mon(1), z80-file(5)