Z80 disassembler for Linux

From: Dwight K. Elvey <dwight.elvey_at_amd.com>
Date: Thu Apr 8 19:39:21 2004

>From: "Ethan Dicks" <dickset_at_amanda.spole.gov>
>
>On Thu, Apr 08, 2004 at 01:46:55PM -0700, Tom Jennings wrote:
>> On Wed, 7 Apr 2004, Dwight K. Elvey wrote:
>>
>> > It is interesting that my definition of a disassembler is
>> > quite a bit different than yours. I would call this a code
>> > lister. A disassembler includes comments, selecting data types,
>>
>> COMMENTS!? I'd like to see a disassembler comment code! Humans
>> even are areally bad at this...
>
>I'm working with a tool that decompiles Z-Machine binaries (think
"Zork")
>into Inform source code. It injects comments into the output code when
you
>describe enum data types. Since decompiling is an iterative process,
one
>of the features I want to add to this tool is comments in the control
file
>that are copied verbatim to the output source file. It puts the burden
on
>the person running the decompiler to understand the output, but it would
>then be _possible_ to have commented output.
>
>-ethan
>

Hi Ethan
 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
( like the counts of how many times a label was used ).
Human comments are always on separate lines. This is
all controlled by the sorted address fields. Comments and
labels are attached to specific addresses that are used
during the merge of the various files.
 This way, the comments are not part of the control file
( no specific advantage here ) but by sorting before merging,
disassembled code, comments and labels don't need to be
placed in the output files in any specific order. Comments
only need to have an address to show order. Order of these
sub pieces that may have the same address is controlled by
the merge order.
 Comments can be easily extracted from an edited list file
by looking for text that doesn't have address. One simply
uses the next address after this text for the next iteration.
Comments are most easily added this way to the previous
output list file and feed back for the next iteration
and future iterations by placing them in the comment file.
The comment file also has the advantage that it can later
be edited to enhance comments or rearrange lines within
comments( remember a comment can be multiple lines with
the same address ).
 I used the DOS sort ( 64K limit fixed by splitting
files ) and my own merge that takes any size files.
It is all handled in a batch file so I just take a break
while it runs.
Dwight
Received on Thu Apr 08 2004 - 19:39:21 BST

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