This post may hold a striking resemblence to a previous post, but don’t worry, it’s no deja-vu. I figured I’d also write a PIC disassembler, based on my previous AVR disassembler. The AVR disassembler’s flexible codebase makes it easy to implement other architectures with instruction opcodes of 16-bits or less. This disassembler features everything the previous one did, but also with a few new handy features.
vPICdisasm is a finished and working Mid-Range PIC disassembler. It should work on most *nix systems, as well as a Cygwin environment.
Here is an excerpt from the README that gives a brief summary of its functionality:
vPICdisasm is an PIC Mid-Range MCU family program disassembler. It supports all 35 PIC instructions, plus the two deprecated ones (”option” and “tris”) as defined by the PICmicro Mid-Range MCU Family Instruction Set, document DS31029A.
This single-pass disassembler can handle Intel HEX8, and Motorola S-Record formatted files containing valid PIC program binaries.
vPICdisasm features a handful of formatting options, including:
- Printing the instruction addresses alongside disassembly, enabled by default
- Ghetto Address Labels (see “Ghetto Address Labels” section)
- Literal operands represented in either hexadecimal, binary, or decimal bases, and as ASCII in an assembly comment
- Data word directive for data not recognized as an instruction during during disassembly
The heart of vPICdisasm is its “Ghetto Address Labels” feature. With this feature, vPICdisasm can produce directly assemble-able disassembly that can be easily modified without having to manually format the disassembly (i.e. adjusting jump or call distances). This means you can disassemble a program, add, remove, and modify any instructions, and directly re-assemble it.
See the vPICdisasm page for a complete description of vPICdisasm, its usage, and the links to download the disassembler.