Recent Changes - Search:

I'm a member of a gym http://atsora.com/index.php/prescription-drugs-for-low-blood-pressure-0ea3.pdf#fleet fda approved generic drugs However, last minute changes are likely as a meeting ofsenior officials who prepare the weekly cabinet meeting'sdecisions was cancelled on Thursday and several ministers werestill at odds about who should foot the bill.

 http://www.hoteldaina.lv/order-winstrol-online-canada-431c.pdf before after winstrol pictures  Surprisingly, during the vast majority of that time period, they employed some of the most blatantly corrupt city officials, mayors and politicians imaginable. That city’s corruption spilled over and infected the state of Illinois, including many of it’s Governors, who have done and are doing time in prison. “JustSayin’”
 http://cristianoweb.net/testosterone-cypionate-200-mg-ml-im-oil-a6be.pdf#advertising watson testosterone cypionate reviews  "While we appreciate House Republicans' newfound interest inthe implementation of health reform, it is clear they are notinterested in anything other than continuing their desperatedrive to sabotage this law, which so far has included shuttingdown the government," said Drew Hammill, spokesman for HouseDemocratic Leader Nancy Pelosi.
 http://brenchleyandmatfield.co.uk/1rxonlinepillsnet-e520.pdf#practise awc-drugstore.co  Municipal officials are offering a gram of gold — worth about $45 at current prices — for each kilogram of weight lost in a 30-day challenge. The minimum drop is two kilograms, or 4.4 pounds, to cash in.
 http://jar400.pl/comprar-citrato-de-sildenafila-50mg-d334.pdf#wholly cijena sildenafila  President Giorgio Napolitano, the man who would have to decide whether to call new elections if the coalition fell apart, urged calm, as did Letta, and given the August holiday lull, we shouldn’t overstate the threat.

PIC disassembly

Magyar English

pic

Reverse engineering a PIC program

Recently, one of my old PIC program was returned, unfortunately I have lost its source code. It should be not a trouble, but it came with a request for a modification, which might be impossible in this case. There are tools like gputils and mplab capable to do disassembly, but I think no need to describe their featureless functionality. So, after goggling around for a while, I have found a quite promising workpiece.

unPIC.pl

One able hungarian programmer (Tams Rudnai) has adopted into Perl, an unmaintained program (by Timo Rossi), so it became platform independent. Its output is quite user friendly, the structure and the operation of the reversed program can be easily known and commented. It has one additional benefit: the reversed program after changing its functionality can be immediately recompiled.

Usage (under linux)

Insall it possibly under your home, e.g. into the /home/our_name/bin subdirectory, and give it an executable right. After the latter, we can use it easily in every directory.
On the other hand, we might copy it beside the program needs to be reversed, and give it executable right, and issue the command. Only one thing should be kept in mind, this way we need to start our command with these characters: "./"

So, issue the command: unPic.pl p18F819.inc program_to_reverse.hex > source.asm or issue ./unPic.pl p18F819.inc program_to_reverse.hex > source.asm. After the name of the program, we need to define the include filename for the target processor (this information is not included in the .hex file, so the program cannot guess it successfully), this file needs to be on the path as well. If it wouldn't, just find it and copy it beside.

After we get back the prompt, we will find the file source.asm in the current folder. This might be immediately recompiled, verifying the functionality of the perl script.

After the recompilation, the comparison of the old and new .hex file is proposed.
We might be frightened, because the two .hex files are not identical. Don't worry, they will be the same in a rare case only. There might be differences, between the read-out from the chip and the compiled version. For example there is the instruction representing the not programmed locations: 0x3fff = addlw 0xff, but this changes to: 0x3eff after recompilation.

So, the comparison should be handled with criticism.

The program can be downloaded from its hompage or from here.

Screenshots about the quality of the produced source code

Header
Header
Subrutine
Subrutine
EEPROM datas
EEPROM datas
Symbol definitions
Symbol definitions
Edit - History - Print - Recent Changes - Search
Page last modified on December 07, 2008, at 12:59 AM