Andrew Warren wrote: > ------- Forwarded Message Follows ------- > > From: John Payson > To: fastfwd@ix.netcom.com > > From: Dmitry Kiryashov > > ; Minimizing ... Final pass . > > ; > > movlw $01 > > btfsc BITNUM,1 > > movlw $04 > > movwf temp > > > > btfsc BITNUM,0 > > addwf temp,f > > Ah... good way to do the conditional shift without worrying about > carry flag. Cool. > > > > btfsc BITNUM,2 > > swapf temp,f > > > > movfw temp > > > > ; 9 words / 9 cycles > That's a savings. Probably makes it as good as the table > for many applications. It seems to be shortest possible solution due to optimal combination in using W and additional register . After I have spend some time I find few anothers but all them have equal or greater code length . The second advantage of this method is saving of initial BITNUM value . WBR Dmitry .