MOV ADD DA
MOV CJNE MOV RET
;----------
A, A, A 51H, A, 51H,
51H #01H A
#60H,EXIT #00H
;如加1键按下直接清零秒 ;子程序返回
;十进制调整
;减1子程序 ;----------
DEC_KEY:CJNE CJNE MOV ADD DA MOV CJNE MOV 出 MOV ADD DA
MOV CJNE MOV MOV A, ADD A, DA A
A, A, A 52H, A, 52H, 51H #99H
;十进制调整
52H #99H A
#99H,EXIT #59H
;选择键功能标志为3调秒,否则跳出
;十进制调整
R1, A, A, 53H, A, 53H,
R5,
#04H,EXIT ;减1键键值
;选择键功能标志为1调时,否则跳出
#01H,NEXT3 53H #99H A
#99H,EXIT #23H
#02H,NEXT4 ;选择键功能标志为2调分,否则跳
;十进制调整
A
NEXT3:CJNE R1,
NEXT4:CJNE R1, #03H, EXIT
MOV 51H, A CJNE A, #99H,EXIT MOV 51H, #59H RET
;子程序返回
39
;----------- ;返回子程序 ;----------- EXIT: RET ;----------------- ;数码管字形编码表 ;-----------------
TABLE:DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H,0FFH ;\,\,\,\,\,\,\,\,\,9\,\不显示\
TABLE1:DB 0FFH,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H,0FFH ;小时编码
;\不显示\,\,\,\,\,\,\,\,\,\,\不显示\END
;子程序返回
40