list p=16f84A ; list directive to define processor
#include <p16F84A.inc> ; processor specific variable definitions
errorlevel -302 , -207 ; suppress message 302 from list file
__config _XT_OSC & _CP_OFF & _PWRTE_OFF & _WDT_OFF
d1 equ 0x0C
d2 equ 0x0D
d3 equ 0x0E
ORG 0x00 ; processor reset vector
GOTO main ; go to beginning of program
ORG 0x004 ; interrupt vector location
NOP
RETFIE ; return from interrupt
main:
MOVLW 0x00
BSF STATUS, RP0
MOVWF TRISB
BCF STATUS, RP0
k: MOVLW 0xFF
MOVWF PORTB
CALL delay
MOVLW 0X00
MOVWF PORTB
CALL delay
GOTO k
delay:
MOVLW 0xFF
MOVWF d3
j: MOVLW 0xFF
MOVWF d2
i: MOVLW 0xFF
MOVWF d1
h: DECFSZ d1, F
GOTO h
DECFSZ d2, F
GOTO i
DECFSZ d3, F
GOTO j
RETURN
end