Z80 disassembler for Linux

From: Dave Dunfield <dave04a_at_dunfield.com>
Date: Fri Apr 9 05:18:44 2004

>>> COMMENTS!? I'd like to see a disassembler comment code! Humans
>>> even are areally bad at this...
> I add comments after the decompiling with a merge. The
>control file just has code start addresses and data block
>types/addresses. I even deal with labels in a separate file that
>is later merged to form the complete output file.
>I even put data in a separate file from the code.
>I like the idea of just merging it all when done.
>The disadvantage of this is that only computer generated
>comments exist on the same line as the code or labels

My disassemblers (see my web page) use two control files:

One controls how the disassembler views memory blocks, including
symbols, block type (code, byte data, word data, reversed word
data, strings etc.)

The other controls comments blocks. For each block, you provide
a memory address (or none=continuation of previous address), and
either block or line comments. Block comments are inserted as
separate lines. Line comments are appended to the end of the code
lines generated by the disassembler.

The disassembler can generate the initial memory control file with
generated symbol names for addresses which are referenced within
the code block. (Sorry - it can't generate initial comments :-) Then
in a highly manual and iterative process, you re-run the disassemler
over and over again, providing more information in these two files
as you "figure it out". The end result (if you stick with it long
enough) is an assembly source file indistinguishable from an original
source file (often better because many people use more meaningful
names and comment better during disassembly then they would when
writing original code!)

I find having the disassembler inject comments is very useful, as it
allows me to re-run the disassembler at any time without losing the
comments (very useful in the "oh crap - this block should really be
WORD data - not BYTE data) situation.

Regards,

-- 
dave04a (at)    Dave Dunfield
dunfield (dot)  Firmware development services & tools: www.dunfield.com
com             Vintage computing equipment collector.
Received on Fri Apr 09 2004 - 05:18:44 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:29 BST