utility_delay: ; this subroutine is a utility delay that counts down from 255 255 times. That's a total count of 65025. It takes approximately 0.05 seconds at 16 MHz movlw D'255' movwf H'0070' ; load 255 into first register movlw D'255' movwf H'0071' ; load 255 into second register subloop: decfsz H'0070', 1 ; count down in first register till we hit 0 goto subloop movlw D'255' movwf H'0070' ; load 255 into first register again decfsz H'0071', 1 ; count down 1 on second register. If we're at 0, we've now gone through 255 loops of 255. Return back to the main program. goto subloop return end ; every program must have an end...at the end. :)