Tool z88dk dis - z88dk/z88dk GitHub Wiki
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).
Usage
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
.
Specifying the CPU
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 |