📄 cpp_a1018v02.asm
字号:
anl a,#0fh
mov r0,a
add a,r0
add a,r0
jmp @a+dptr
;
prog_mod3_jmp:
ljmp set_mod0
ljmp set_mod1
ljmp set_mod2
ljmp set_mod3
ljmp set_mod4
ljmp set_mod5
ljmp set_mod6
;
set_mod0:
mov a,key_val1
add a,#255-10
jnc set_mod0_10
mov a,key_val1
xrl a,#0bh
jnz set_mod0_1
lcall get_key_tone
inc time_mode
mov a,time_mode
xrl a,#10
jnz set_mod0_0
mov time_mode,#0
set_mod0_0:
ret
set_mod0_1:
xrl a,#0bh
xrl a,#0ch
jz set_mod0_2
lcall get_error_tone
ret
set_mod0_2:
mov a,buf_min0
add a,#0ffh-59h
jc set_mod0_4
mov a,buf_hour0
add a,#0ffh-23h
jc set_mod0_4
mov a,buf_month0
add a,#0ffh-12h
jc set_mod0_4
mov dptr,#table_days_of_month
mov a,buf_month0
dec a
movc a,@a+dptr
cjne a,buf_day0,set_mod0_3
nop
set_mod0_3:
jc set_mod0_4
lcall get_key_tone
mov buf_year,buf_year0
mov buf_month,buf_month0
mov buf_day,buf_day0
mov buf_hour,buf_hour0
mov buf_min,buf_min0
mov b,#7
lcall get_send_mode
sjmp set_mod0_5
set_mod0_4:
lcall get_error_tone
set_mod0_5:
mov set_mode,#0
mov disp_pnt,#0
lcall display_date_and_clock
lcall clr_all_number
lcall _write_1622_data
ret
;
set_mod0_10:
mov a,key_val1
cjne a,#0ah,set_mod0_10_0
mov key_val1,#0
set_mod0_10_0:
mov dptr,#time_set_jmp
mov a,time_mode
add a,time_mode
jmp @a+dptr
;
time_set_jmp:
sjmp time_mod0
sjmp time_mod1
sjmp time_mod2
sjmp time_mod3
sjmp time_mod4
sjmp time_mod5
sjmp time_mod6
sjmp time_mod7
sjmp time_mod8
sjmp time_mod9
;
time_mod0:
time_mod1:
mov r0,#buf_year0
sjmp time_mod9_0
time_mod2:
time_mod3:
mov r0,#buf_month0
sjmp time_mod9_0
time_mod4:
time_mod5:
mov r0,#buf_day0
sjmp time_mod9_0
time_mod6:
time_mod7:
mov r0,#buf_hour0
sjmp time_mod9_0
time_mod8:
time_mod9:
mov r0,#buf_min0
time_mod9_0:
clr f0
mov a,time_mode
rrc a
jnc time_mod9_1
setb f0
time_mod9_1:
mov a,key_val1
jb f0,time_mod9_2
swap a
time_mod9_2:
mov r1,a
mov a,@r0
jb f0,time_mod9_3
anl a,#0fh
sjmp time_mod9_4
time_mod9_3:
anl a,#0f0h
time_mod9_4:
orl a,r1
mov @r0,a
lcall display_setting_clock
lcall _write_1622_data
lcall get_key_or_play_tone
ret
;
set_mod1:
mov a,key_val1
cjne a,#0ch,set_mod1_10
mov a,set_pnt
add a,#255-1
jc set_mod1_1
set_mod1_0:
lcall get_error_tone
sjmp set_mod1_6
set_mod1_1:
lcall get_key_tone
mov r2,set_pnt
mov r0,#set_buf
set_mod1_2:
movx a,@r0
xrl a,#0ah
jnz set_mod1_3
inc r0
djnz r2,set_mod1_2
mov r0,#areacode_byte
mov a,#0
movx @r0,a
mov b,#30
ajmp set_mod1_5
set_mod1_3:
mov r1,#areacode_buf
mov b,#30
mov r0,#areacode_byte
set_mod1_3_0:
mov a,set_pnt
movx @r0,a
mov r2,set_pnt
mov r0,#set_buf
set_mod1_4:
movx a,@r0
movx @r1,a
inc r0
inc r1
djnz r2,set_mod1_4
set_mod1_5:
lcall set_eepr_mode
set_mod1_6:
mov set_mode,#0
mov disp_pnt,#0
lcall clr_all_number
lcall _write_1622_data
ret
;
set_mod1_10:
add a,#255-10
jnc set_mod1_11
lcall get_error_tone
ret
set_mod1_11:
mov a,set_pnt
add a,#255-4
jnc set_mod1_12
lcall get_error_tone
ret
set_mod1_12:
mov a,set_pnt
add a,#set_buf
mov r0,a
mov a,disp_pnt
add a,#disp_buf
mov r1,a
mov a,key_val1
movx @r0,a
mov @r1,a
inc set_pnt
inc disp_pnt
lcall display_number
lcall _write_1622_data
lcall get_key_or_play_tone
ret
;
set_mod2:
mov a,key_val1
cjne a,#0ch,set_mod2_10
mov a,set_pnt
add a,#255-1
jc set_mod2_0
sjmp set_mod1_0
set_mod2_0:
lcall get_key_tone
mov r2,set_pnt
mov r0,#set_buf
set_mod2_1:
movx a,@r0
xrl a,#0ah
jnz set_mod2_2
inc r0
djnz r2,set_mod2_1
mov r0,#ip_byte
mov a,#0
movx @r0,a
mov b,#31
ajmp set_mod1_5
set_mod2_2:
mov r1,#ip_nub_buf
mov b,#31
mov r0,#ip_byte
sjmp set_mod1_3_0
;
set_mod2_10:
sjmp set_mod1_10
;
set_mod3:
mov a,key_val1
cjne a,#0ch,set_mod3_10
lcall get_key_tone
clr f_play_nub
mov a,temp_val
jz set_mod3_0
setb f_play_nub
set_mod3_0:
mov b,#35
ajmp set_mod1_5
;
set_mod3_10:
cjne a,#0ah,set_mod3_11
mov temp_val,#0
mov a,#0
sjmp set_mod3_12
set_mod3_11:
cjne a,#1,set_mod3_13
mov temp_val,#1
mov a,#1
set_mod3_12:
mov r0,#disp_buf
mov @r0,a
mov disp_pnt,#1
lcall display_number
lcall _write_1622_data
lcall get_key_or_play_tone
ret
set_mod3_13:
lcall get_error_tone
ret
;
set_mod4:
mov a,key_val1
cjne a,#0ch,set_mod4_10
lcall get_key_tone
mov r0,#music_ix
mov a,temp_val
movx @r0,a
mov b,#33
ajmp set_mod1_5
;
set_mod4_10:
cjne a,#40h,set_mod4_12
mov a,temp_val
cjne a,#0ch,set_mod4_11
ret
set_mod4_11:
inc temp_val
mov melody_val,temp_val
mov tone_mode,#music_tone
ret
set_mod4_12:
cjne a,#41h,set_mod4_14
mov a,temp_val
cjne a,#1,set_mod4_13
ret
set_mod4_13:
dec temp_val
mov melody_val,temp_val
mov tone_mode,#music_tone
set_mod4_14:
ret
;
set_mod5:
mov a,key_val1
cjne a,#0ch,set_mod5_10
lcall get_key_tone
mov r0,#volu_ix
mov a,temp_val
movx @r0,a
mov b,#34
ajmp set_mod1_5
;
set_mod5_10:
cjne a,#40h,set_mod5_12
mov a,temp_val
cjne a,#14h,set_mod5_11
ret
set_mod5_11:
inc temp_val
mov melody_val,temp_val
mov tone_mode,#music_tone
ret
set_mod5_12:
cjne a,#41h,set_mod5_14
mov a,temp_val
cjne a,#11h,set_mod5_13
ret
set_mod5_13:
dec temp_val
mov melody_val,temp_val
mov tone_mode,#music_tone
set_mod5_14:
ret
;
set_mod6:
mov a,key_val1
cjne a,#0ch,set_mod6_10
lcall get_key_tone
clr f_del_0
mov a,temp_val
jz set_mod6_0
setb f_del_0
set_mod6_0:
mov b,#36
ajmp set_mod1_5
;
set_mod6_10:
ajmp set_mod3_10
;
;
prog_mod4:
mov a,key_val1
cjne a,#0ah,prog_mod4_0
lcall get_key_or_play_tone
mov set_mode,#50h
ret
prog_mod4_0:
ljmp prog_stu_4_0
;
prog_mod5:
mov a,key_val1
cjne a,#0ah,prog_mod5_0
mov a,#0
mov key_val1,a
prog_mod5_0:
add a,#255-0
jnc prog_mod5_1
sjmp prog_mod4_0
prog_mod5_1:
lcall get_key_or_play_tone
mov a,key_val1
orl a,#60h
mov set_mode,a
mov disp_pnt,#0
ret
;
prog_mod6:
mov a,key_val1
cjne a,#0ch,prog_mod4_0
lcall display_ver
lcall _write_1622_data
mov disp_ver_time,#255
mov set_mode,#70h
;
prog_mod7:
ret
;
;
;
;===========================================
; handfree or hook off process subroutine
;===========================================
;
pre_dial_stu:
mov a,mobile_status
xrl a,#3
jnz pre_dial_0
lcall clr_icon_talking
lcall display_total_missed
lcall display_date_and_clock
lcall clr_all_number
lcall _write_1622_data
clr hf_flag.f_hf
mov main_status,#1
mov r0,#music_ix
movx a,@r0
mov melody_val,a
mov tone_mode,#music_tone
ret
;
pre_dial_0:
jb hook_flag.f_hook_off,pre_dial_1
jb hf_flag.f_hf,pre_dial_1
lcall clr_icon_talking
lcall display_total_missed
lcall display_date_and_clock
lcall clr_all_number
lcall _write_1622_data
mov main_status,#0
mov tone_mode,#0
ret
pre_dial_1:
jb key_flag.f_prs,pre_dial_2
ljmp pre_dial_20
pre_dial_2:
clr key_flag.f_prs
mov key_val1,key_val0
mov out_of_time,#12
mov a,key_val1
cjne a,#80h,pre_dial_3
cpl hf_flag.f_hf
mov a,dial_pnt_in
jnz pre_dial_2_0
jnb hf_flag.f_hf,pre_dial_2_0
lcall get_dial_tone
ret
pre_dial_2_0:
lcall get_key_tone
ret
pre_dial_3:
mov a,key_val1
cjne a,#44h,pre_dial_4
lcall get_key_tone
pre_dial_3_0:
mov a,dial_pnt_in
add a,#256-3
jc pre_dial_3_1
ret
pre_dial_3_1:
lcall del_0_of_013
mov rd_pnt_in,dial_pnt_in
mov b,#12
lcall set_eepr_mode
ajmp pre_dial_5_2_0
;
pre_dial_4:
cjne a,#43h,pre_dial_5
mov a,dial_pnt_in
jnz pre_dial_4_0
ret
pre_dial_4_0:
dec dial_pnt_in
mov rd_pnt_in,dial_pnt_in
mov a,dial_pnt_in
jnz pre_dial_4_1
lcall get_dial_tone
mov disp_pnt,#0
lcall clr_all_number
lcall _write_1622_data
ret
pre_dial_4_1:
add a,#256-14
jc pre_dial_4_2
lcall get_key_tone
dec disp_pnt
lcall display_number
lcall _write_1622_data
ret
pre_dial_4_2:
lcall get_key_tone
mov a,dial_pnt_in
clr c
subb a,#14
mov r2,a
mov r1,#disp_buf
pre_dial_4_3:
mov a,r2
rrc a
clr f0
jnc pre_dial_4_4
setb f0
pre_dial_4_4:
anl a,#0fh
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -