org 0x00
;goto main;
PORTB equ 0x06 ;
PORTA equ 0x05 ;
TRISA equ 0x85 ;
TRISB equ 0x86 ;
STATUS equ 0X03 ;
INPUT equ 0X07 ;
bsf STATUS,5
movlw 00H
movwf TRISB
movlw B'1111'
movwf TRISA
bcf STATUS,5
movlw 00H
movwf PORTB
movlw b'11000001'
movwf option_reg
;; bsf intcon,7 <<<------remove this
func
bcf intcon,2
bcf STATUS,C ;required so only 1 bit set
rrf PORTB,1
movfw PORTB ;this is required
btfsc STATUS,Z ;otherwise port B
bsf PORTB,7 ;will end up zero
movlw 0xfa
movwf TMR0
goto check
return;
main
movlw 01H ;\
movwf PORTB ; | This is never
movlw 0xfa ; | executed
movwf TMR0 ;/
check btfs[COLOR="Red"]c[/COLOR] intcon,2 ;<-- changed
goto func
goto check
end;