Dmitry Kiryashov wrote: > This way was definitely tested and discussed sometime ago ;-) > > > Or: > > clear_bit: > > movlw 1 ;mask=2^test > > btfsc test,1 > > movlw 4 > > movwf mask > > > > btfsc test,0 > > addwf mask,f > > > > btfsc test,2 > > swapf mask,f > > > > comf mask,w ;invert mask > > andwf PORTB,f Hi Dmitry, I was refering to the first routine I made, not this one. As I remember, this routine is from you. regards, Reggie -- e-mail: rberdin@bigfoot.com ICQ#: 31651436 URL: http://www.bigfoot.com/~rberdin