Scott Dattalo wrote: > Given: > bit_a of register A > bit_b of register B > bit_c of register C > > The goal in C parlance is: > > C.bit_c = A.bit_a ^ B.bit_b; > > A.bit_a B.bit_b | C.bit_C > ---------------------+--------- > 0 0 | 0 > 0 1 | 1 > 1 0 | 1 > 1 1 | 0 > > .... > > points = 9 - max execution cycles > > My best version scores 3 points. > > PS. Andy, I'll give you back the beer if you can score > 4 points or buy you a bud lite if you score 3. Scott: BSF C,bit_c BTFSS A,bit_a BCF C,bit_c MOVLW 1 << bit_c ; This is legal because bit_c is a ; literal. BTFSC B,bit_b XORWF C Points = 9 - 6 = 3. Looks like you owe me a Bud Lite... -Andy === Meet other PICLIST members at the Embedded Systems Conference: === 6:30 pm on Wednesday, 1 October, at Bytecraft Limited's booth. === === For more information on the Embedded Systems Conference, === see: http://www.embedsyscon.com/ === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499