----- Original Message ----- From: Pic Dude To: Sent: Sunday, March 10, 2002 4:29 PM Subject: Re: [PIC}: Bit operation quiz... > So you're saying you'll take the challenge to beat 10 steps? :-) > challenge eh? movwf tmp andlw 15 addwf pcl goto lab0 goto lab1 goto lab2 goto lab3 goto lab4 goto lab5 goto lab6 goto lab7 goto lab8 goto lab9 goto lab10 goto lab11 goto lab12 goto lab13 goto lab14 goto lab14 lab0 movf tmp,w goto labend lab1 movf tmp,w xorlw 9 ;1 goto labend lab2 movf tmp,w xorlw 6 ;2 goto labend lab3 movf tmp,w xorlw 15 ;3 goto labend lab4 movf tmp,w xorlw 6 ;4 goto labend lab5 movf tmp,w xorlw 15 ;5 goto labend lab6 movf tmp,w goto labend lab7 movf tmp,w xorlw 9 ;7 goto labend lab8 movf tmp,w xorlw 9 ;8 goto labend lab9 movf tmp,w goto labend lab10 movf tmp,w xorlw 15 ;10 goto labend lab11 movf tmp,w xorlw 5 ;11 goto labend lab12 movf tmp,w xorlw 15 ;12 goto labend lab13 movf tmp,w xorlw 6 ;13 goto labend lab14 movf tmp,w xorlw 9 ;14 goto labend lab15 movf tmp,w goto labend Regards Sergio -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.