On 11 Sep 96 at 20:22, M Walter wrote: > I have an application which uses a PIC 16C58A. After a few years of > production, our customer would like us to make a small change in the > operation of the device. Unfortunetly whoever my job predecessor was > did not document any of the code, or it got lost. Anyway, I am stuck > with trying to either recreate the application code from scratch or > reading the code from the present device and dis-assembling it. > > I am able to read the code out of the device using a PICStart Plus > and MPLAB. The code looks ok, but of course I don't have any of the > meaningfull labels. Not a big deal since I can walk thru it and add > my own labels and comments. HOWEVER I found some lines of code which > don't make any sense. I got one line > TRIS PORTC > The 16C58A does not have a PORTC, so how come I got a TRIS for that > port? Is it reachable by normal execution? PS the TRIS instruction seems to be being phased out in preference of the TRIS registers. > > Anyone have any hints for disassembling code from the hex file? Yes. Ppls first impression will probably be that you're doing some illicit hacking Strings/ lookup tables look funny. Lots of retlw statements, usually. MikeS (remove the you know what before replying)