Hi! Well, another form, using CC5X compiler could be: ; W = 10; m003 MOVLW .10 ; if (RB0) W = 20; BTFSC 0x06,RB0 MOVLW .20 ; Fred = W; MOVWF Fred Same as one could wrote in assembly, but it needs some knowledge about how the compiler deals with W register, just in case. Cheers, Diego. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu