> I'm thinking of writing an Optimizer for PIC Hex Files. > It would take in a hex file, Disassemble it, and then > try various optimizations. This is impossible in the general sense. For example, suppose you encountered MOVLW h'3A' That could be the low or high byte of an address, or just an arbitrary constant. There are lots of other gotchas too. You need to know the original intent of the code to do any meaningful optimizations. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.