【正文】
****************************** DISP:MOV PDIG,0FFH MOV A,SECL ADD A,DID MOV R0,A MOV A,R0 MOV DPTR,TAB MOVC A,A+DPTR CPL A MOV POUT,A MOV A,DIG MOV PDIG,A RR A MOV DIG,A INC DID MOV A,DID CJNE A,NO,DSEXT MOV DID,0 MOV DIG,0DFHDSEXT: RET。返回按鍵值:VAL。 MOV DIG,0FEH CLR MSYS SETB TFL。K3 :當(dāng)前時(shí)間值減1。K4 :調(diào)整到下一位數(shù),時(shí)分秒POUT EQU P2KPIN EQU P1PDIG EQU P3NO EQU 6MTH EQU HIGH(65536MTM)MTL EQU LOW(65536MTM)MTM EQU 1000MSYS BIT TA DATA 30HTB DATA 31HSEC DATA 32HMIN DATA 33HHOU DATA 34HSECL DATA 35HSECH DATA 36HMINL DATA 37HMINH DATA 38HHOUL DATA 39HHOUH DATA 3AHDID DATA 3BHDIG DATA 3CHVAL