>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? > >Anyone have any hints for disassembling code from the hex file? Thanks. >Mark Walter Mark, does the device concerned have the code protect bit enabled ? When CP is on, the chip scrambles the data output when read. I've seen similar things from chips that I'd used CP on when trying to recover code after I had a nasty HDD crash a couple of years ago ! :-( Then again, can't say I've ever seen a "good" HDD crash !! Yes, I should of had a back-up. I went out & bought one the next day and have used it (and verify) EVERY DAY since. Sleep much better now. :-) Regards... ______________________________________ Dave Duffy, Audio Visual Devices 8/9-11 Trade Street Cleveland Qld 4163, Australia Ph: +61 7 38210362 Fax: +61 7 38210281 E-mail: AVD@mailbox.uq.edu.au ______________________________________