> 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 Perhaps: rlf FSR movlw 1 ; Could also be movf flag,w ... xorwf FSR rrf FSR Note that when all is said and done FSR will have the same value it started with, Z will almost certainly be cleared, carry will be toggled, and nothing else will be affected.