<--  back   Last regenerated: 2022-04-20 17:31:36 kio

zasm - Z80 Assembler – Version 4.4

Command Line Options

Command line options

When invoking zasm you can append options to it on the command line, most notably the name of the source file.

zasm [options] [-i] inputfile [[-l] listfile|dir] [[-o] outfile|dir]

default output dir = source dir
default list dir = output dir

Typical invocations

zasm -uwy emuf_rom.asm
List of command line options as printed by zasm:
-u  --opcodes   include object code in list file
-w  --labels    append label listing to list file
-y  --cycles    include cpu clock cycles in list file
-b  --bin       write output to binary file (default)
-x  --hex       write output in intel hex format
-s  --s19       write output in motorola s-record format
-z  --clean     clear intermediate files, e.g. compiled c files
-e  --compare   compare own output to existing output file
-T  --test      run self test (requires developer source tree)
-g  --cgi       prevent access to files outside the source dir
--maxerrors=NN  Pseudo instructions: defl, set and '='
Labels: SET
set maximum for reported errors (default=30, max=999) --date=DATETIME for reproducible __date__ and __time__ (default=now) --target=ram default to 'ram' not 'rom' => cpu addresses in hex files -o0 don't write output file -l0 don't write list file --Command Line Options: --z80
Pseudo instructions: .z80, .z180 and .8080
Targets: #target Z80
z80 target Zilog Command Line Options: --z80
Pseudo instructions: .z80, .z180 and .8080
Targets: #target Z80
Z80 (default except Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
if --asm8080) --Command Line Options: --z180
Pseudo instructions: .z80, .z180 and .8080
z180 enable Command Line Options: --z180
Pseudo instructions: .z80, .z180 and .8080
Z180 / HD64180 instructions --8080 restrict to Intel 8080 (default Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
if --asm8080) --asm8080 use 8080 assembler syntax --convert8080 convert source from 8080 to Command Line Options: --z80
Pseudo instructions: .z80, .z180 and .8080
Targets: #target Z80
Z80 mnemonics -v0 -v1 -v2 verbosity of messages to stderr (0=off, 1=default, 2=more) --Command Line Options: --ixcbxh, .ixcbxh, _ixcbxh_
--ixcbr2, .ixcbr2, _ixcbr2_

Commands for command line options: --ixcbxh, .ixcbxh, _ixcbxh_
--ixcbr2, .ixcbr2, _ixcbr2_
ixcbr2 | …xh enable ill. instructions like 'Pseudo instructions: defl, set and '='
Labels: SET
set b,(ix+d),r' or 'Pseudo instructions: defl, set and '='
Labels: SET
set b,xh' --Command Line Options: --dotnames, .dotnames
Commands for command line options: --dotnames, .dotnames
Label definition: --dotnames
dotnames allow Pseudo instructions: Label definition
Numeric expressions: Labels
8080 Assembler: Labels
label names starting with a dot '.' --reqcolon colon ':' after Types of labels: Program labels
Types of labels: Program labels
program label definitions required => label definitions and instructions may start in any column --Command Line Options: --casefold, .casefold
Commands for command line options: --casefold, .casefold
Label definition: --casefold
casefold Pseudo instructions: Label definition
Numeric expressions: Labels
8080 Assembler: Labels
label names are case insensitive (implied Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
if --asm8080) --Command Line Options: --flatops, .flatops
Commands for command line options: --flatops, .flatops
flatops no operator precedence: evaluate strictly from left to right -Command Line Options: -c /path/to/cc
Command line options for C compiler: -c /path/to/cc
c path/to/cc Pseudo instructions: defl, set and '='
Labels: SET
set path to c compiler (default: sdcc in $PATH) -Command Line Options: -t /path/to/dir
Command line options for C compiler: -t /path/to/dir
t path/to/dir Pseudo instructions: defl, set and '='
Labels: SET
set path to temp dir for c compiler (default: output dir) -Command Line Options: -I /path/to/dir
Command line options for C compiler: -I /path/to/dir
I path/to/dir Pseudo instructions: defl, set and '='
Labels: SET
set path to c system header dir (default: sdcc default) -Command Line Options: -L path/to/dir
Command line options for C compiler: -L path/to/dir
L path/to/dir Pseudo instructions: defl, set and '='
Labels: SET
set path to standard library dir (default: none)

Options can be packed, e.g. '-uwy' is the same as giving 3 separate options.
Also, due to the way zasm parses it's arguments, you can even include options which require an additional argument in this way:

$> zasm -cuwy /bin/sdcc emuf.asm

Here the 'c' will eat the '/bin/sdcc'.

Valid HTML   Valid CSS