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
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057 | ;********************** Scroll ************************
cblock h'40'
scroll_lp
scroll_adr
scroll_adrw
scroll_lp1
scroll_to
scroll_from
scroll_data
endc
scroll
movlw d'16' ;Set loop count
movwf scroll_lp ;Save loop count
movlw scrnhd ;Set screen head adr
addlw d'15' ;Head address + 15(Right)
movwf scroll_adr ;Save screen adr
movlw scrnwhd ;Set screen work head adr
movwf scroll_adrw ;Save screen work adr
scroll_loop
;----------------- Screen shiftting -------------------
movlw d'15' ;Set loop count
movwf scroll_lp1 ;Save loop count
movlw scrnhd ;Set screen head adr
movwf scroll_to ;Save TO address
addlw d'1' ;TO address + 1
movwf scroll_from ;Save FROM address
scroll_loop1
movf scroll_from,w ;Read FROM adr
movwf fsr ;Set FROM adr
movf indf,w ;Read FROM data
movwf scroll_data ;Save data
movf scroll_to,w ;Read TO adr
movwf fsr ;Set to adr
movf scroll_data,w ;Read data
movwf indf ;Write data
incf scroll_to,f ;TO adr + 1
incf scroll_from,f ;FROM adr + 1
decfsz scroll_lp1,f ;Shift end ?
goto scroll_loop1 ;No. Next
;-------------- End of Screen shiftting ---------------
movf scroll_adrw,w ;Read screen work adr
movwf fsr ;Set screen work adr
movf indf,w ;Read screen work data
movwf scroll_data ;Save data
movf scroll_adr,w ;Read screen adr
movwf fsr ;Set screen adr
movf scroll_data,w ;Read data
movwf indf ;Write data
call led_cnt ;LED control
call t100m ;Wait 100 msec
incf scroll_adrw,f ;Screen work adr + 1
decfsz scroll_lp,f ;Scroll end ?
goto scroll_loop ;No. Next
return |