Michael, your sample code will ALWAYS set carry on. Plus, if the carry flag starts off cleared, it will test to see if cleared (which it is), then will test to see if it is set, which is unnecessary, since you already know it must be cleared. Martin R. Green elimar@bigfoot.com ---------- From: Michael S. Hagberg[SMTP:mhagberg@MAIL.PRIMARY.NET] Sent: Sunday, September 28, 1997 12:43 PM To: PICLIST@mitvma.mit.edu Subject: Re: Complementing Carry to complement any bit you can do the following. note: the carry bit (bit 0) is in the status register (ram location 3). btfsc 3,0 ; status,c bcf 3,0 btfss 3,0 bsf 3,0 what instruction was used to place the data into 'w'. if it didn't set the zero flag you could use this iorlw 0 ; sets the zero flag if 'w' is zero michael