List p=18f4550,f=inhx32 #include org 0 ; create variables delay1 res 2 delay2 res 2 ; start: clrf PORTD clrf TRISD clrf delay1 clrf delay2 .loop: btg PORTD,RD1 ; toggle portd pin 1 (20) .delay: decfsz delay1,1 ; decrement delay1 by 1, and skipp till the next ; instruction is delay1 is 0 goto .delay decfsz delay2,1 goto .delay goto .loop end