001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029 | ;*********************** Flash ************************
cblock h'40'
flash_lp
flash_id
flash_idw
flash_data
endc
flash
movlw d'16' ;Set loop count
movwf flash_lp ;Save loop count
movlw scrnhd ;Set screen head adr
movwf flash_id ;Save screen adr
movlw scrnwhd ;Set screen work head adr
movwf flash_idw ;Save screen work adr
flash_loop
movf flash_idw,w ;Read "FROM" adr
movwf fsr ;Set "FROM" adr
movf indf,w ;Read "FROM" data
movwf flash_data ;Save "FROM" data
movf flash_id,w ;Read "TO" adr
movwf fsr ;Set "TO" adr
movf flash_data,w ;Read "FROM" data
movwf indf ;Write data
incf flash_id,f ;"TO" adr + 1
incf flash_idw,f ;"FROM" adr + 1
decfsz flash_lp,f ;Copy end ?
goto flash_loop ;No. Copy next
call led_cnt ;LED control
return |