tool-dis

Disassembles z88dk binaries and object files across multiple Z80-family CPU targets.

1.1k|206|Updated Mar 16, 2016
One-click install
npx skills add https://github.com/z88dk/z88dk --skill tool-dis-z88dk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tool-dis
Source: https://github.com/z88dk/z88dk/tree/main/.agents/skills/tool-dis
Command: npx skills add https://github.com/z88dk/z88dk --skill tool-dis-z88dk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When debugging z88dk-compiled programs, you often need to see what machine code actually landed at a given address, verify opcode generation for a specific CPU variant, or compare two builds at the binary level. This Skill guides the use of the z88dk-dis disassembler to inspect linked binaries with symbol context. ## Core Features & Use Cases - Multi-CPU disassembly: Supports z80, z180, z80n, ez80, Rabbit, R800, Game Boy z80, 8080, 8085, and KC160 via the -m flag family. - Symbol-aware output: Load map/symbol files with -x so disassembly shows named labels at the correct load, start, and end addresses. - Methodology guidance: Know when to prefer assembler listings (z88dk-z80asm -l) for verifying synthetic instruction expansion in library sources versus disassembling linked binaries. - Use Case: You suspect an 8085 build emitted wrong opcodes for a synthetic instruction. Disassemble the binary with -m8085 and a map file, or generate an assembler listing to confirm the expanded bytes. ## Quick Start Disassemble my program.bin for the z80 target starting at address 0x8000 using the symbols from program.map.

Frequently Asked Questions about tool-dis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I disassemble a z88dk binary with symbol names?

Run z88dk-dis with the -x flag pointing to your map file, placed before the -o, -s, and -e address options so symbols apply to those addresses. For example: z88dk-dis -x program.map -o 0x8000 -s 0x8000 program.bin.

Which CPUs does z88dk-dis support?

z88dk-dis supports z80, z180, z80n, ez80 in short and ADL modes, Rabbit 2000A through 6000, R800, Game Boy z80, 8080, 8085, and KC160. Select the target with the matching -m flag such as -m8085 or -mz180.

Should I use z88dk-dis or z88dk-z80asm listings to check codegen?

Prefer assembler listings from z88dk-z80asm -l when verifying synthetic instruction expansion in library sources, since the .lis file shows expanded opcodes clearly. Use z88dk-dis for linked binaries where you need map-based symbol context.

Why does z88dk-dis show wrong opcodes for my binary?

The CPU mode flag likely does not match the binary's target. Match the -m flag to the architecture the code was compiled for, such as -m8085 for 8085 builds, since opcode interpretations differ across CPU variants.

How do I compare two z88dk builds at the binary level?

Disassemble the same address range in both binaries using identical -o, -s, and -e parameters and the same CPU mode. Diff the two outputs to spot codegen or library expansion differences between builds.