关于数字钟的一个调试 求教……
ORG 0000HAJMP MAINL
ORG 000BH
AJMP TIMER0
MAINL:
MOV 21H,#23H
MOV 22H,#59H
MOV 23H,#57H
MOV SP,#60H
MOV TMOD,#01H
MOV TL0,#0B0H
MOV TH0,#3CH
MOV 20H,#00H
MOV IE,#82H
SETB TR0
SETB ET0
DISPLAY:
LCALL LOOP
SJMP DISPLAY
TIMER0:
MOV TL0,#0B0H
MOV TH0,#3CH
INC 20H
MOV A,20H
DJNZ A,#0AH,DONE
MOV A,#00H
MOV A,21H
ADD A,#01H
DA A
DJNZ A,#60H,DONE
MOV 21H,#00H
MOV A,#22H
ADD A,#01H
DA A
DJNZ A,#60H,DONE
MOV 22H,#00H
MOV A,23H
ADD A,#01H
DA A
DJNZ 23H,#24H,DONE
MOV 23H,#00H
DONE:
MOV A,21H
ANL A,#0FH
MOV 30H,A
MOV A,21H
ANL A,#0F0H
SWAP A
MOV 31H,A
MOV A,22H
ANL A,#0FH
MOV 32H,A
MOV A,22H
ANL A,#0F0H
SWAP A
MOV 33H,A
MOV A,23H
ANL A,#0FH
MOV 34H,A
MOV A,23H
ANL A,#0F0H
SWAP A
MOV 35H,A
RETI
LOOP:
MOV R0,#30H
MOV R7,#6
MOV B,#0FEH
L1:
MOV A,@R0
MOV DPTR,#DCODE
MOVC A,@A+DPTR
MOV DPTR,#0CFA0H
MOVX @DPTR,A
MOV P1,B
LCALL DELAY
MOV P1,#0FEH
MOV A,B
RL A
MOV B,A
INC R0
DJNZ R7,LOOP
RET
DCODE:DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH
DELAY:MOV R3,#10
LCOP2:MOV R2,#25
LCOP1:NOP
DJNZ R2,LCOP1
DJNZ R3,LCOP2
RET
END
好多错的,希望大神们帮我改下,或者有调试好的发给我 在这非常感谢