Home > pic-decompiler

pic-decompiler

Pic-decompiler is a project mainly written in Perl, based on the View license.

Decompiler for PIC16 binaries

This is a simple decompiler for 8-bit PIC microcontrollers. It takes in a disassembled listing generated by gpdasm. It reads the header file supplied by gputils (currently hard-coded for the PIC16F876a). Further, addExtraRegisterMappings() establishes redundant register mappings not defined in the header. The decompiler then traces the execution flow, expands the program and data addresses, taking into account PCLATH and banking. It detects functions and marks up execution branches. The output is another listing that is hopefully much easier to read than the original.

The whole program is very immature and has many shortcomings (and likely bugs). It IS mature enough to be generally useful, though.