> > Complementing a bit without affecting W requires > >lengthy goto instructions. > > Not true! As a final thought on this neverending subject, consider: > bcf tmp,0 ;Use value of 0 > skpc ;if carry is 1 > bsf tmp,0 ;if carry 0, use 1. > rrf tmp,f ;New bit to carry bit. > This does require a temporary register, but not W. It doesn't affect any > status bits except carry. It can be made conditional by skipping the rrf > conditionally. If you add an "rlf tmp,f" to the beginning of that, then "tmp" will be unaffected (though making it conditional will be a little harder).