[Coco] disassembling
David
dbree at duo-county.com
Thu Jan 15 07:28:41 EST 2004
On Wed, Jan 14, 2004 at 03:38:09PM -0600, Roger Taylor wrote:
> Is there much disassembling going on today? I've had a request or two for
> adding a disassembler mode to Portal-9. It sounds interesting enough that
> we could take one of the many CoCo .rom files or .bin files and turn them
> back into source code that is ready to be reassembled.
>
> If I add this mode, it would work by taking a preloaded binary file and
> then converting it into another edit window as CCASM source code. I think
> a panel of switches should be available so the user can quickly toggle some
> modes, change a few params, then do it again until the source code is
> workable, cutting down on how much manual editing will be required, if any.
>
> Any suggestions?
I don't know if it would fill your requirements or fit in, but we have a
cross disassembler stored on the os9tools project.
It will compile on Linux, mingw, and cygwin. It's a CLI, but one might
be able to add a front-end.
It's modelled after Dynamite+. It depends on two file types, a single
command file, which determines what mode, label class, etc, a certain
location or range is to be disssembled as. The second file type is one
or more label files, which define the label names you wish.
It was designed to disassemble coco basic, os9 (and flex and motorola),
but I only implemented it to disassemble os9 code, but it wouldn't take
much to extend it to handle RS-Basic (and the others if desired). I
just got lazy and didn't carry it on.
It only handles 6809 code right now. It shouldn't take much to extend
it to handle 6309 code. Again, laziness...
I don't have any documentation posted. I did copy the original
Dynamite+ documention into html, but decided that it might be a
copyright infringement. I never did write my own. Docs for the flex
verion of Dynamite can be found on a flex users' group - can't recall
the URL now, but a google search for dynamite disassembler turned it up
for me as the first entry, I think. These docs cover most everything
except for offset labelling - a very handy feature where you can define
a label as an offset from some other location or the PC itself.
Apparently this was not included in the flex version.
The source is on the os9tools project. If anyone wishes to add to it,
or fix anything, go ahead. It seems to disassemble anything accurately
except for one thing and I don't know if I fixed that or not. What
this thing was, was that if it disassembled a data area (that hadn't
been defined as such), of course it would try to disassemble it as code,
and if it interpreted it as a memory location external to the program,
it didn't assign it the right class, or some such - been a while.
Again, I don't know if I fixed it or not - I may have decided to call
that a "feature". Wherever this happened, you'd need to define that
area as a data area anyway :-)
More information about the Coco
mailing list