align movlw PORTB [COLOR="Red"]<<--- change this[/COLOR] movwf cpostn btfsc cpostn ,pos goto stay ; its the right position btfsc cpostn,lft ; check the for left turn goto mvlft ; sub-routine to move left btfsc cpostn ,rht goto mvrht btfsc cpostn ,nsn goto park goto align
Read what the commands do - MOVLW is MOVe Literal to W - this moves the fixed number following it into the W register. In the case of PORTB, as that has the value 6, it will move 6 to W, and nothing but 6.but left me confiused , why have "movlw" woked else where .
and not here ????