How about: btfss My_Flags, Complement_Carry goto done btfsc STATUS, CARRY goto clear_carry bsf STATUS, CARRY goto done clear_carry: bcf STATUS, CARRY done: It takes a few more locations and cycles, but it doesn't require a register. HTH - Martin R. Green elimar@bigfoot.com ---------- From: N STEENKAMP [M.ING E&E][SMTP:STEENKMP@FIRGA.SUN.AC.ZA] Sent: Friday, September 26, 1997 11:14 PM To: PICLIST@mitvma.mit.edu Subject: Complementing Carry Hi all, I have been stuck now for at least 1/2 hour trying to figure out a way to conditionally complement the carry flag on an '84. The best I could come up with was: comf STATUS, W movwf Temp btfsc My_Flags, Complement_Carry rrf Temp, W This just doesn't feel like the right way! I also tried: movlw 01h btfsc MyFlags, Complement_Carry xorwf STATUS, F but it didn't work. I was hoping that the xorwf instruction would operate as normal and change the carry flag and afterwards set the Z flag if the result was 0, but C is totally protected from being modified. Has anyone got a better approach (preferably one that does not need a file register)? Maybe its staring me in the face, but right now I'm staring at the insides of my eyelids :-O G'night (to all on this side of the globe) Niki