Practical issue with PIC PWM
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