It's been a while since there's been a challenge. And since there's been a bunch talk about RS232 stuff, I thought it might be appropriate if we had a really fast parity generator for those software bit-banging UARTs. So here's the challenge: Given the variable X, write a routine that computes the odd-parity of X. Here's a routine that's slow/looped: CLRF parity LOOP: CLRC RRF X,F ;Get LSB and put it in the carry SKPNC ;If LSB (i.e. C) is set INCF parity,F ;then count it MOVF X,F SKPZ GOTO LOOP The least significant bit of 'parity' contains the parity of X. The best I could do executes in 7 cycles and trashes X. Scott