These are some sample delays:	Copy and paste the code into your .asm 


This delay creates FFh loops. Each loop takes 4uS
Total time: 256 x 4 = 1024uS =  say 1mS

Del	NOP
	DECFSZ 1A,1	;Decrement file 1A
	GOTO Del	;Loop until file 1A is zero
	RETURN 



This delay creates 80h loops. Each loop takes 4uS
Total time: 128 x 4 = 512uS

Del	MOVLW 80h	;Put 80h into W
	MOVWF 1A	;Copy 80h into file 1A
DelA	NOP
	DECFSZ 1A,1	;Decrement file 1A
	GOTO DelA	;Loop until file 1A is zero
	RETURN 



NESTED DELAY
This delay creates FFh loops (determined by file 1B). 
Each loop takes 4uS and there are 256 inner loops = 1024uS = 1mS
This inner loop is executed 256 times via file 1B. 
Total time = 260mS

Del	NOP
	DECFSZ 1A,1	;Decrement file 1A
	GOTO Del	;Loop until file 1A is zero
	DECFSZ 1B,1	;Decrement file 1B
	GOTO Del	;Loop until file 1B is zero
	RETURN 


For a delay between 1mS and 260mS, you will need to pre-load file 1B:

Del 	MOVLW 7Dh
	MOVLW 1B
Del1	NOP
	DECFSZ 1A,1	;Decrement file 1A
	GOTO Del1	;Loop until file 1A is zero
	DECFSZ 1B,1	;Decrement file 1B
	GOTO Del1	;Loop until file 1B is zero
	RETURN 