> movf ,W > skpnc > incfsz ,W > addwf ,F > > As a slick way to do handle carries in an N-byte multiple precision add. If > this trick is well-known, it has somehow escaped me. [James: how about a > section on N-byte arithmetic in the code snippets archive?] Note that this only works if RESULTBYTE is the last (highest) byte of the multi-byte number. The carry generated by this code snippet won't be correct for use by the next byte. This is because a carry could occur from the INCFSZ instruction, which is then lost when the ADDWF instruction executes. ***************************************************************** Olin Lathrop, embedded systems consultant in Devens Massachusetts (978) 772-3129, olin@cognivis.com, http://www.cognivis.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: "[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads