>Does anyone know of a low instruction count method of inverting a >single bit in a register. For example inverting bit 0 in the PortB >register. I'm making this up as I go, but what about: movlw 0x01 xorwf portb Does that work? Any bits except for bit 0 are preserved (if it's a 0 xored w/ 0, you get 0; if it's a 1 xored w/ 0, you get 1), and bit 0 is toggled ( a 1 xored w/ 1 is 0, a 0 xored w/ 1 is 1). Right? Dave Johnson