This quickstart walks you through the core 9900dis workflow: run an initial disassembly pass, read the output, add labels and equates, and re-run to get a progressively more readable listing. By the end you will understand how the iterative annotation loop works and be ready to apply it to your own ROM files.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/caljer1/9900dis/llms.txt
Use this file to discover all available pages before exploring further.
Before you begin, make sure 9900dis is installed and accessible on your PATH (or that you know the full path to the binary). You will also need a binary ROM file to disassemble. See installation if you have not set up 9900dis yet.
Run the first pass
Run 9900dis with the base address of your ROM (
--aorg), the input binary (--rom), and the output listing file (--listing):--aorg 6000sets the base address to>6000in hex. This is the address the ROM is mapped to in the CPU’s address space. The disassembler uses it to compute the correct program counter value for each instruction.--rom sys.binis the input binary file.--listing sys.asmis the output file. If it does not exist it will be created. If it already exists, any annotations you have added will be read back and preserved.
sys.asm contains a raw listing with no symbolic information.Examine the raw output
Open Each line contains:
sys.asm in a text editor. A typical raw output line looks like this:- The decoded mnemonic and operands (
SOCB @>028a,r2). - A comment with two fields:
pc:>0000is the program counter (ROM base address plus offset), andw:>f0a0is the raw 16-bit word stored at that address.
Add a label
Identify a line whose address you know to be an entry point. Add a label in the label column (the text before the mnemonic, separated by a tab):Two things were done here:
- The label
RESETwas added to the left of the mnemonic. - The
f:dataformat hint was appended to the comment to tell the disassembler to treat this word as a data value rather than an instruction on the next run.
pc value on that line. Save the file.Re-run and see the improvement
Run the disassembler again with the same arguments:The disassembler reads back now reads:Every reference to
sys.asm, picks up the RESET label at address >0000, and rewrites every reference to that address using the symbol. For example, a BLWP instruction elsewhere in the ROM that previously read:>0000 throughout the listing is replaced with @RESET automatically.Add an equate
For memory-mapped I/O addresses and other constants that are not inside the ROM itself, use an equate. Add a line anywhere in the listing (typically near the top):Re-run the disassembler. Any instruction that references the address instead of the raw address:Repeat this process — adding labels, equates,
>E000 as an operand will now use the symbolic name:f:data hints, and comments — across as many passes as needed until the listing is as readable as you require.Next steps
Iterative workflow
Learn the full iterative annotation loop and strategies for identifying entry points in complex ROMs.
Annotation format
Complete reference for labels, equates, format hints, and inline comments.
Command reference
All command-line options for 9900dis, including
--aorg, --cpu, and --version.