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. fcb[=COUNT] Flag next COUNT [1] bytes as data. fdb=ADDRESS,ADDRESS Address range to be represented as word data. fdb[=COUNT] Flag next COUNT [1] words as data. fcc=ADDRESS,ADDRESS Address range to be represented as text data. fcc=COUNT Flag next COUNT bytes as text data. code[=COUNT] Flag next COUNT [1] bytes as code. 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 label=0x401e,text fcc=17 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 $90e5 puls cc,a,b,x,pc text fcc /NOW IN RAM MODE\r/ fcc $00