----- Original Message ----- From: Olin Lathrop To: Sent: Thursday, October 19, 2000 3:57 PM Subject: Re: [PIC]: Number crunching, enclosed is 24x24 equ 48, have fun > > > > movf ,W > > > > skpnc > > > > incfsz ,W > > > > addwf ,F > > > > > > However, that brings up another problem. If SOMEBYTE was 255 and there was > an incoming carry, the ADDWF will get skipped, which will prevent RESULTBYTE > from being set. I am presuming here that the point of the code snippet is > to perform an add with carry in/out of SOMEBYTE + RESULTBYTE --> RESULTBYTE? > Olin, today is _not_ your day. Yes, we skip setting in the case that was 255 and there was an incoming carry. This is because we would have been adding 0 (255 plus the carry == 256, 256 mod 256 == 0) to , anyway! Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: PICList Posts must start with ONE topic: "[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads