N STEENKAMP [M.ING E&E] wrote: > 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 Try the following . movfw status btfsc MyFlags,Complement_Carry xorlw 1 andlw 1 ;or something like that WBR Dmitry .