endp
;---------------------------------------------------------------------------
; are we in on/off mode?
; C = 0 if yes
proc
call
clr
cjne
sjmp
no_on:
cjne
sjmp
no_off:
setb
yes:
ret
endp
;---------------------------------------------------------------------------
; store current frequency to memory
proc
mov
setb
storeloop:
call
jc
call
jc
dec
as 0FFh
clr
subb
mov
clr
add
jnb
setb
mov
clr
rl
jb
add
mov
mov
mov
inc
mov
mov
sjmp
store_am:
add
mov
mov
mov
inc
mov
mov
skip_store:
clr
ret
endp
;---------------------------------------------------------------------------
; turn on/off:
proc
push
chkonoff
getmode
; get current mode
c
; default: yes
a,#mode_on,no_on; dispatch
yes
a,#mode_off,no_off
yes
c
; other mode
storeprg
auxdata,#15
; clear num display
STORE
; turn store LED on
chkonoff
; bail out of input loop?
skip_store
readnum
; otherwise get number of program
storeloop
a
; transform 1.. --> 0.. , 0 will be sieved out
c
a,#NUMPROGS
; in allowed range?
b.7,c
c
a,#NUMPROGS
b.7,storeloop
acc.7
; found a valid number: show in display
auxdata,a
acc.7
; for address computation
a
AM,store_am
; AM/FM division
a,#fm_progs
; store FM program
r0,a
a,fm_prog
@r0,a
r0
a,fm_prog+1
@r0,a
skip_store
a,#am_progs
; store AM program
r0,a
a,am_prog
@r0,a
r0
a,am_prog+1
@r0,a
STORE
; LED off again
switchon_am_prg ; with program number in A
reg0
; needed for addressing
Need help?
Do you have a question about the RT200 and is the answer not in the manual?