proc
push
call
mov
loop:
clr
movc
jz
call
mov
inc
inc
mov
cjne
done:
pop
ret
endp
;---------------------------------------------------------------------------
; display a time stored at (R0)
proc
inc
mov
dec
jb
clr
clr
mov
mov
div
call
mov
mov
call
mov
inc
mov
mov
div
jz
call
suppress:
mov
mov
call
setb
mov
ret
invtime:
clr
mov
mov
mov
setb
mov
ret
endp
;---------------------------------------------------------------------------
; display frequency
write
reg0
clrdisp
; clear other stuff
r0,#dispdata+1
; points to leftmost digit
a
; get a byte from string
a,@a+dptr
done
; terminate at NUL
segtranslate
; otherwise translate...
@r0,a
; ...and print
dptr
; next char
r0
; next digit
a,r0
; end of display reached?
a,#dispdata+6,loop
reg0
disptime
r0
; bit 7 of hours set ?
a,@r0
r0
acc.7,invtime
KHZ
; no frequency display!
MHZ
a,@r0
; display minutes
b,#10
ab
segtranslate
dispdata+3,a
a,b
segtranslate
dispdata+4,a
r0
a,@r0
; display hourss
b,#10
ab
suppress
; suppress leading 0 for hours
segtranslate
dispdata+1,a
a,b
segtranslate
acc.0
; dot between hour + min
dispdata+2,a
a
; clear display for invalid time
dispdata+1,a
dispdata+3,a
dispdata+4,a
acc.0
dispdata+2,a
Need help?
Do you have a question about the RT200 and is the answer not in the manual?