; initialization stuff
list p=16f874A ; set the pic type
__config B'11111110111001' ; set configuration bits
include "p16f874A.inc"
;Using general purpose registers
cblock 0x20
temp
temp2
temp3
endc
org 0x0000
bsf STATUS,RP0 ;select bank 1
movlw 0x00
movwf TRISD
bcf STATUS,RP0 ; back to Register Page 0
Loop
call Setup
call Delay
movlw 0xFF
movwf PORTD
call Setup
call Delay
movlw 0x00
movwf PORTD
goto Loop
Setup
movlw 0xFF
movwf temp
movwf temp2
movwf temp3
return
Delay
decfsz temp, 1
goto $+2
decfsz temp2, 1
goto $+2
decfsz temp3, 1
goto Delay
return
end