Practical issue with PIC PWM

assemblymplabpicpwm

I have written the following code to generate PWM and to change the duty cycle when a button is pressed. In simulations it works fine. However when actually implemented the circuit, the PWM starts when the button is pressed. But after an about 2 secs it will stop. PWM is not generated continuously. Is there any reasons why this is happening?
(eg: PIC is defect, error in assembly code)

*I'm using internal clock of the PIC

 PROCESSOR PIC16F628A
#INCLUDE <P16F628A.INC>
#INCLUDE <BANKSEL.INC>   ;a macro is used to easily change the banks


org 0x00

;set the PWM period
  Bank1
   movlw d'249'    ; PR2 is 249 when Fosc=4MHz, TMR2 prescale=4
   movwf PR2

;set the PWM duty cycle- initially set to zero
Bank0
 movlw d'0'  ; set bits 9 - 2
   movwf CCPR1L
   bcf CCP1CON,CCP1X  ; set bit 5
   bcf CCP1CON,CCP1Y  ; set bit 4

  ;Make the CCP1 pin an output
  Bank1
  bcf TRISB,3

  bsf TRISB,0;make RB0 as input 

 ;Set the TMR2 prescale value  
   Bank0
   movlw b'00000101'   ; TMR2 = on, prescale = 1:4
   movwf T2CON

 ; enable pwm mode
   bsf CCP1CON,3        
   bsf CCP1CON,2  

l 
btfsc PORTB,0 ;bit test f skip if clear
call inc
goto l 


inc
movlw d'50'
addwf CCPR1L,1
return

END

The schematic

Best Answer

Thank you PeterJ. Clearing the WDT inside the loop fixed the issue. Following is the modified part of the code.

l 
clrwdt
btfsc PORTB,0 ;bit test f skip if clear
call inc
goto l