STATUS equ 03h
PORTA equ 05h
TRISA equ 85h
count1 equ 07h
count2 equ 08h
;***set up ports, all porta pins to output***
bsf STATUS,5 ;go to bank 1
movlw b'00000000' ;set trisa,
movwf TRISA ;so all porta are outputs
bcf STATUS,5 ;now to bank 0
;Blinking portion of program start point
Start
;turn all PORTA ports high
movlw b'11111111' ;set all porta pins,
movwf PORTA ;to 1
;call a delay before turning leds off
call LongDelay
;now turn all leds off
movlw b'00000000' ;set all porta pins,
movwf PORTA ;to 0
;Call a delay
call LongDelay
;Now go back to start so the cycle repeats
goto Start
;***Delay subroutine, inserts a short delay
Delay
movlw 0xff
movwf count1
loop1
decfsz count1,1
goto loop1
return
;***LongDelay subroutine, inserts a long delay
LongDelay
movlw 0xff
movwf count2
loop2
call Delay
decfsz count2,1
goto loop2
return
;end program
end