[PicForth] Re: A smarter disassembly utility
Samuel Tardieu
sam at rfc1149.net
Thu Oct 28 11:20:59 CEST 2004
>>>>> "David" == David McNab <david at rebirthing.co.nz> writes:
David> fdasm is a wrapper for the gputils 'gpdasm' disassembler, which
David> parses a hex file disassembly and cross-references it against a
David> picforth-generated .map file.
David> It then outputs a disassembly annotated with known symbols,
David> much more intelligible than raw disassembly.
David, how do this compare to PicForth integrated disassembler?
Here is an example of PicForth disassembly (excerpt from
i2cloader.fs):
; name: add-to-buffer
; max return-stack depth: 1
0x0661 0823 movf 0x23,w
0x0662 0384 decf 0x04,f
0x0663 0080 movwf 0x00
0x0664 2604 call 0x604 ; any-!
0x0665 0AA3 incf 0x23,f
0x0666 0008 return
; name: reset-i2c-buffer
; max return-stack depth: 0
0x0667 3025 movlw 0x25
0x0668 00A3 movwf 0x23
0x0669 0008 return
; name: read-eeprom-data
; max return-stack depth: 2
0x066A 2667 call 0x667 ; reset-i2c-buffer
0x066B 0826 movf 0x26,w
0x066C 00C5 movwf 0x45
0x066D 3010 movlw 0x10
0x066E 00C6 movwf 0x46
0x066F 0845 movf 0x45,w
0x0670 261E call 0x61E ; ee@
0x0671 2661 call 0x661 ; add-to-buffer (rs depth: 1)
0x0672 0AC5 incf 0x45,f
0x0673 0BC6 decfsz 0x46,f
0x0674 2E6F goto 0x66F ; read-eeprom-data + 0x005
0x0675 3020 movlw 0x20
0x0676 0685 xorwf 0x05,f
0x0677 0008 return
Sam
--
Samuel Tardieu -- sam at rfc1149.net -- http://www.rfc1149.net/sam
More information about the PicForth
mailing list