Fellas,
If you've ever used the Sourceror from Glen Bredon's Merlin 8/16 to
disassemble 6502/65816 object files in the hope of generating usable (or at
least understandable) assembler source code, and have found the Sourceror
lacking in features and non-intuitive to use, take a good look at Ewen
Wannop's latest creation -- 'BrkDown' - the Desktop Interface Disassembler.
While I've always been a fan of lean and swift command line interface
programs, there are times when a well-designed Desktop/GUI program can be
the superior tool for the task. Disassembly of unfamiliar object code, I
think, is one of those times.
In a sense, BrkDown is a word processor for object code. It gives windowed
access to an entire object file and allows the user visually to select
(either via mouse or keyboard) sections of the object code and to apply
assembly language 'meaning' to those selections by the use of several
functions, including:
1. Define As Data (Byte/Word/Long Word/Hex Bytes/Binary/DS reserve)
2. Define Strings (pString/cString/wString)
3. Define As Code (Emulated/Native/re-ORG)
Throw in the ability to pre-specify custom labels for certain addresses,
insert comments, insert directives and build generic labels. By that time
you're ready to generate some fairly robust source code (in either Merlin or
ORCA/M format).
Obviously, BrkDown isn't generating the author's original source code
comments, but I understand Ewen is working on that. <grin>
Anyway, to illustrate (I hope), I've included below a few 'before' and
'after' shots from BrkDown:
BEFORE - Raw Disassembly from an AppleWorks TimeOut Application that has
been instructed to load at $2100.
****************************************************************
*
* Disassembled by BrkDown on 4/22/15 10:46:37 PM
*
* Project: TO.ADD52
*
****************************************************************
0000 002100: 4C 78 21 JMP $2178
0003 002103: 0B DC I1'$0B'
0004 002104: 02 DC I1'$02'
0005 002105: E1 26 SBC ($26,x)
0007 002107: 44 DC I1'$44'
0008 002108: 10 00 BPL $210A ; {+00}
000A 00210A: 00 BRK
000B 00210B: 00 BRK
000C 00210C: 0C 41 64 TSB $6441
000F 00210F: 64 20 STZ $20
0011 002111: 46 69 LSR $69
0013 002113: 6C 65 20 JMP ($2065)
0016 002116: 35 2E AND $2E,x
0018 002118: 32 00 AND ($00)
AFTER - Disassembly modified by:
(i) Hex Bytes defined from $2103-2107.
(ii) Single Bytes defined from $2108-210B.
(iii) pString defined from $210C-$2118.
(iv) DS reserve(s) defined from $2119-215E.
****************************************************************
*
* Disassembled by BrkDown on 4/22/15 10:46:37 PM
*
* Project: TO.ADD52
*
****************************************************************
0000 002100: 4C 78 21 JMP $2178
0003 002103: 0B 02 E1 26 DC H'0B02E12644'
0008 002108: 10 DC I1'$10'
0009 002109: 00 DC I1'$00'
000A 00210A: 00 DC I1'$00'
000B 00210B: 00 DC I1'$00'
000C 00210C: 0C 41 64 64 STR 'Add File 5.2'
0019 002119: DS 4
001D 00211D: DS 65
005E 00215E: DS 2
BEFORE - Raw Disassembly from later in the same TimeOut Application.
(note: BrkDown is using the pre-defined custom labels I supplied)
0078 002178: 20 4B 11 JSR MvRightRtn
007B 00217B: 00 BRK
007C 00217C: 7E 87 21 ROR $2187,x
007F 00217F: 54 DC I1'$54'
0080 002180: 00 BRK
0081 002181: 20 00 11 JSR ClearDA
0084 002184: 4C 00 7E JMP $7E00
0087 002187: 20 8A 11 JSR WriteCom
008A 00218A: 48 PHA
008B 00218B: 7E A9 00 ROR $00A9,x
008E 00218E: 8D 85 0D STA $0D85
AFTER - Disassembly modified by:
(i) 2-Byte 'Words' defined from $217B-2180 and $7E03-7E04.
(ii) re-ORG beginning at $2187 (now $7E00).
(iii) 6502 Code defined from $7E05-7E06.
0078 002178: 20 4B 11 JSR MvRightRtn
007B 00217B: 00 7E DC I2'$7E00'
007D 00217D: 87 21 DC I2'$2187'
007F 00217F: 54 00 DC I2'$0054'
0081 002181: 20 00 11 JSR ClearDA
0084 002184: 4C 00 7E JMP $7E00
0087 * Load address changed:
0087 007E00: org $7E00
0087 007E00: 20 8A 11 JSR WriteCom
008A 007E03: 48 7E DC I2'$7E48'
008C 007E05: A9 00 LDA #$00
008E 007E07: 8D 85 0D STA $0D85
This post is obviously too long, and I've really only scratched the surface
here.
If you've ever thought about disassembling a program to see what made it
tick, and have found the existing command line disassemblers a bit
intimidating, give BrkDown a try. I think you'll be pleasantly surprised.
Nice job, Ewen!
Hugh Hood
in article
1m32fyd.1fvz0qjgjwgsmN%spectr...@nospam.com, Ewen at
spectr...@nospam.com wrote on 4/18/15 2:39 AM:
> Announcing a new Disassembler for the IIgs.
>
> As my tribute to OZ Kfest, I am announcing my latest projectŠ