Main: movfw PORTB andlw b'0000001' movwf PORTD btfsc PORTB,0 bcf PORTD,1 bsf PORTD,1 goto Main