6809dasm.pl - a 6809/6309 disassembler written in Perl. The script accepts binary data on standard input, and gives disassembly on standard output. Various options can be set with command line arguments: -3, --6309 Allow 6309 instructions. org=ADDRESS Set origin of disassembled code. end=ADDRESS Indicate end of code. Absolute addresses beyond the disassembled code will not automatically be given labels. forceorg=ADDRESS Explicitly add another ORG statement. fcb=ADDRESS,ADDRESS Address range to be represented as byte data. fdb=ADDRESS,ADDRESS Address range to be represented as word data. fcc=ADDRESS,ADDRESS Address range to be represented as text data. label=ADDRESS,LABEL Insert label. comment=ADDRESS,TEXT Insert comment. commentbyte=ADDRESS Flag an instruction as a no-op with executable code as its data. Usually used to skip a piece of code on the first iteration of a loop. 6809dasm.pl should always produce output that can be reassembled with asm6809. Most relative branches are labelled. Branches into areas that fall mid-instruction (either due to misidentified data areas or embedding of instructions within instructions) have extra labels added relative to the beginning of the instruction. Example: $ ./6809dasm.pl org=0x4000 fcc=0x401e,0x4100 64k.bin org $4000 pshs cc,a,b,x orcc #$50 ldx #$8000 L_4007 sta >$ffde ldd ,x sta >$ffdf std ,x++ cmpx #$ff00 bcs L_4007 leax <$401d,pcr jsr >$90e5 puls cc,a,b,x,pc fcc /NOW IN RAM MODE/,$0d fcc $00 $