---- START NEW MESSAGE --- Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-8.05) id A7996412008E; Thu, 29 Jan 2004 15:30:33 -0800 Received: from PEAR.EASE.LSOFT.COM (209.119.0.19) by cherry.ease.lsoft.com (LSMTP for Digital Unix v1.1b) with SMTP id <4.00CC3A54@cherry.ease.lsoft.com>; Thu, 29 Jan 2004 18:30:19 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8e) with spool id 4702 for PICLIST@MITVMA.MIT.EDU; Thu, 29 Jan 2004 18:30:11 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 7650; Thu, 29 Jan 2004 18:28:03 -0500 Received: from linda-3.paradise.net.nz [202.0.58.22] by mitvma.mit.edu (IBM VM SMTP Level 430) via TCP with ESMTP ; Thu, 29 Jan 2004 18:28:02 EST X-Comment: mitvma.mit.edu: Mail was sent by linda-3.paradise.net.nz Received: from smtp-3.paradise.net.nz (smtp-3a.paradise.net.nz [202.0.32.196]) by linda-3.paradise.net.nz (Paradise.net.nz) with ESMTP id <0HS90034KYIRNE@linda-3.paradise.net.nz> for PICLIST@MITVMA.MIT.EDU; Fri, 30 Jan 2004 12:28:03 +1300 (NZDT) Received: from Paradise (202-0-40-99.adsl.paradise.net.nz [202.0.40.99]) by smtp-3.paradise.net.nz (Postfix) with SMTP id 74764AE1AF for ; Fri, 30 Jan 2004 12:28:03 +1300 (NZDT) MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Mailer: Microsoft Outlook Express 6.00.2800.1158 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit X-Priority: 3 X-MSMail-priority: Normal References: <2193429B07D9914D97216EBBAA6AB8BD1A0537@whitlam.corp.gli.com.au> Message-ID: <00db01c3e6bf$a6f63080$7b01a8c0@Paradise> Date: Fri, 30 Jan 2004 12:28:43 +1300 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: Russell McMahon Subject: Re: [PIC:] Disassemblers To: PICLIST@MITVMA.MIT.EDU Precedence: list X-RCPT-TO: Status: U X-UIDL: 371856369 > Here's an example of the disassembled code (from the "good" code, not the > potentially "bad" code) > > ld (bc),a ; 0000 02 . > call c,Xdc02 ; 0001 dc 02 dc \.\ > ld (bc),a ; 0004 02 . > call c,Xdc02 ; 0005 dc 02 dc \.\ > ld (bc),a ; 0008 02 . ......... Without even trying to understand any of that, it isn't utterly daunting. Assuming your disassembler is "synced in" it should produce good code. If it's not then that could explain some differences. If you have data scattered through the code a 'dumb" disassembly will run through data blocks as if they are code. When you exit the data block it may at first not be in sync and make a further mess of the result. A bit of low level digging will show if this is happening. 1K is not a vast amount of code to rebuild by hand. I'm presently trying to fit new code into a 1K Zilog device (Z8PE003) to upgrade functionality of an existing product. Every now and then a client gets me to update a 16k odd 8051 program for a device that he paid money to have the code written for but only has uncommented source code available for. (In this case the variables have meaningful alpha English names, but they were written by a Taiwanese programmer :-) ). Reverse engineering is entirely doable - just annoying. There's a fair chance that an intelligent comparison would allow gross functionality changes to be determined relatively easily. Russell McMahon -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. .