Tool z88dk dis
A full z80 disassembler is provided with z88dk. In addition to supporting the z80, it can also disassemble code for the other supported CPUs (8080, 8085 gbz80, ez80 (z80 mode), z180, R800, z80-z80n and Rabbit processors) as well as the related (but unsupported by the compilers) processors: ez80 (ADL mode).
At its simplest:
z88dk-dis -o [address] [binary file]
Will load binary file at the specified address and start disassembling from that point.
The diassembler understands the .map files generated by z80asm, and these will be read using the -x
option:
z88dk-dis -o [address] -x [map file] [binary file]
Symbols that appear in more than one compiled source code file (module) will have the module name appended to them. e.g. a symbol named loop
in modules fopen_c
and fclose_c
will become loop_fopen_c
and loop_fclose_c
.
The following options control which CPU z88dk-dis will interpret the binary as.
Flag | CPU | Notes |
---|---|---|
-mz80 | Z80 | |
-mz180 | Z180 | |
-mez80_z80 | ez80 | Z80 mode |
-mez80 | ez80 | ADL mode |
-mz80n | ZX-Next | Supports the extended opcodes in the ZX Next CPU |
-mr2ka | Rabbit 2000 | |
-mr3k | Rabbit 3000 | |
-mr4k | Rabbit 4000 | |
-mr800 | Ascii R800 | As used in the MSX Turbo |
-mc160 | Kawasaki KC160 | |
-mgbz80 | Gameboy z80 | |
-m8080 | Intel 8080 | Using Z80 Opcodes |
-m8085 | Intel 8085 | Using Z80 Opcodes |
- Overview
- Platform List
- Unsupported Platforms
- i8080/5 Support
- Homebrew hardware quickstart
- Retargetting
- Building the libraries
- Clang support
- Pragmas
- Adding to Classic
- Introduction
- Library Configuration
- CRT
- Header Files
- Assembly Language
- Library in Depth
- Embedded Platform
- Adding to NewLib
- Benchmarks
- Datatypes
- Debugging
- Decompression
- More than 64k
- Deficiencies
- Compiling Larger Applications
- Importing routines written in 8080 assembly mnemonics
- Using CP/M libraries in REL format with z88dk
- Writing optimal code
- Speeding up Compilation
- CMake usage