Here's one more... This one takes 19 words, but executes in either 5 or 7 cycles, INCLUDING the test-and-branch at the end of the routine that all the previously-posted solutions have ignored. Oh... And this one doesn't affect X, either. SWAPF X,W XORWF X,W ANDLW 00001111B ADDWF PC GOTO ZERO GOTO ONE GOTO ONE GOTO ZERO GOTO ONE GOTO ZERO GOTO ZERO GOTO ONE GOTO ONE GOTO ZERO GOTO ZERO GOTO ONE GOTO ZERO GOTO ONE GOTO ONE ZERO: .... ONE: .... -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499