1Z80DASM(1)              Z80 disassembler User's manual              Z80DASM(1)
2
3
4

NAME

6       z80dasm - Z80 assembly generating disassembler
7

SYNOPSIS

9       z80dasm [ options ] file
10

DESCRIPTION

12       z80dasm disassembles a binary file containing Z80 machine code into Z80
13       assembly language source (including a number of undocumented  opcodes).
14       It  can  try to guess locations of labels in the code or the labels can
15       be specified by hand in the form of a  symbol  file.  If  given  proper
16       information  the  disassembler can also split the binary file into code
17       and data sections of several different types.
18
19       Generated source file can be assembled back into  the  original  binary
20       using  z80asm,  zasm  or the original Zilog assembler (when the --zilog
21       option was used).
22

OPTIONS

24       -a, --address
25              Print the address of the memory location corresponding  to  each
26              line of assembly code in a comment at the end of the line.
27
28       -b, --block-def=FILE
29              Read block information from a file. If this option is not speci‐
30              fied the default is for the entire file to contain machine code.
31              See BLOCK FILE below.
32
33       -g, --origin=ORG
34              Specify the start address of the binary code being disassembled.
35              A corresponding org directive is generated in the  output  file.
36              The  argument  is  read in hexadecimal if  it  begins with 0x or
37              0X, in octal if it begins with 0,  and  in  base  10  otherwise.
38              Default is 0x0100.
39
40       -h, --help
41              Show summary of options and exit.
42
43       -l, --labels
44              Try to guess label locations from jump instructions and add them
45              to the assembly code.
46
47       -o, --output=FILE
48              Specify the output file. Default is to write to standard output.
49
50       -s, --sym-output=FILE
51              Write symbol information into a file.
52
53       -S, --sym-input=FILE
54              Read symbol information from a file. See SYMBOL FILE below.
55
56       -t, --source
57              Print the binary data corresponding to  each  line  of  assembly
58              code in a comment at the end of the line. Data is printed in hex
59              and ASCII. This is useful for identifying data sections  in  the
60              first disassembly.
61
62       -v, --verbose
63              Increase  verbosity  level.   Specify  multiple times to be more
64              verbose.  Messages are sent to standard error.
65
66       -V, --version
67              Display version information and exit.
68
69       -z, --zilog
70              Enable compatibility mode for the original Zilog Z80  assembler.
71              This currently only changes the syntax of relative jumps.
72
73

SYMBOL FILE

75       Symbol  files  written  by z80dasm can be directly used as input symbol
76       files with the --sym-input option. The following directives are  recog‐
77       nized  in  input  symbol  files and are propagated to the output symbol
78       files:
79
80
81       include "filename"
82              Include  another  symbol  file.  Double  quotes  are  mandatory.
83              Included files must be in the current directory.
84
85
86       symbol: equ value
87              Define  a  symbol with a value. The value is read in hexadecimal
88              if it begins with 0x or 0X, in octal if it begins with 0, and in
89              base 10 otherwise. Default is 0x0100.
90
91
92       ; comment
93              All characters between a semi-colon and end of line are ignored.
94
95

BLOCK FILE

97       Block  files specify the boundaries between different blocks (sections)
98       of binary data in the disassembler input file. The following directives
99       are recognized:
100
101
102       name: start address end address type type
103              Define  a  block  with the start and end address that contains a
104              certain type of binary data. Start address is the 16 bit address
105              of  the  first  byte  in  the  block.  End address is the 16 bit
106              address of the last byte in the block plus one.
107
108
109       ; comment
110              All characters between a semi-colon and end of line are ignored.
111
112
113       The following block types are supported:
114
115
116       code   Block containing Z80 machine code. Data in this  block  will  be
117              written in Z80 assembly language.
118
119
120       bytedata
121              Data block containing separate bytes. Data in this block will be
122              written with defb directives.
123
124
125       worddata
126              Data block containing 16 bit words (low order byte first).  Data
127              in this block will be written with defw directives.
128
129
130       pointers
131              Data  block  containing  16 bit pointers (low order byte first).
132              This type is equivalent to worddata except that values  will  be
133              replaced with labels where that is possible.
134
135

DIAGNOSTICS

137       If  disassembly  was  successful z80dasm returns 0. On error diagnostic
138       messages are printed to standard error and z80dasm returns 1.
139
140

BUGS

142       Please report bugs to tomaz.solc@tablix.org
143

AUTHOR

145       z80dasm is based largely on dz80 , written by  Jan  Panteltje.  Feature
146       enhancements and bug fixes were made by Tomaz Solc.
147

SEE ALSO

149       z80asm(1)
150
151
152
153Tomaz Solc                        2007-06-14                        Z80DASM(1)
Impressum