call InitLCD ; initialize LCD subsystem |B0
PutLCD cmd,cgram+0 ; cgram addr + 0..63 |B0
PutLCD dat,b'00100' ; upload char 0 "Up Arrow" |B0
PutLCD dat,b'01110' ; |B0
PutLCD dat,b'11111' ; |B0
PutLCD dat,b'00100' ; |B0
PutLCD dat,b'00100' ; |B0
PutLCD dat,b'00100' ; |B0
PutLCD dat,b'00100' ; |B0
PutLCD dat,b'00000' ; |B0
PutLCD dat,b'00100' ; upload char 1 "Dn Arrow" |B0
PutLCD dat,b'00100' ; |B0
PutLCD dat,b'00100' ; |B0
PutLCD dat,b'00100' ; |B0
PutLCD dat,b'11111' ; |B0
PutLCD dat,b'01110' ; |B0
PutLCD dat,b'00100' ; |B0
PutLCD dat,b'00000' ; |B0
PutLCD cmd,line1 ; |B0
PutLCD dat,0 ; the <up> arror char |B0
PutLCD cmd,line1+3 ; ddram addr line 1, htab 3 |B0
PutLCD str,"K8LH Klock"
PutLCD cmd,line2 ; |B0
PutLCD dat,1 ; the <dn> arrow char |B0
PutLCD cmd,line2+4 ; ddram addr line 2, htab 4 |B0
PutLCD str,"HH:MM:SS"
Loop
btfss flags,0 ; clock update? |B0
goto Loop ; no, branch, else |B0
bcf flags,0 ; clear the flag |B0
PutLCD cmd,line2+4 ; ddram addr line 2, htab 4 |B0
PutLCD hex,hour ; print 'HH' hour digits |B0
PutLCD dat,":" ; print ':' char |B0
PutLCD hex,mins ; print 'MM' minute digits |B0
PutLCD dat,":" ; print ':' char |B0
PutLCD hex,secs ; print 'SS' second digits |B0
goto Loop ; do it all over again |B0