我编程的秒表,可是我不知道哪里错了没有显示出来
[复制链接]
ORG 00H LJMP MAIN ORG 0BH LJMP IT ORG 30H MAIN:MOV SP,#30H MOV TMOD,#01H MOV TH0,#3CH MOV TL0,#0B0H SETB EA SETB ET0 SETB TR0 MOV 70H,#00H MOV 71H,#00H MOV 72H,#00H MOV 73H,#00H MOV R4,#0AH D2:LCALL XS LJMP D2 XS:MOV R1,#70H MOV R2,#0FEH D0:MOV A,@R1 MOV DPTR,#TABLE MOVC A,@A+DPTR MOV P1,A MOV P3,R2 LCALL YS INC R1 MOV A,R2 RL A MOV R2,A JNB ACC.4,D1 LJMP D0 D1:RET ORG 500H TABLE:DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH IT:PUSH PSW PUSH ACC PUSH TH0 PUSH TL0 MOV TH0,#3CH MOV TL0,#0B0H DJNZ R4,PF MOV R4,#0AH INC 70H MOV A,70H CJNE A,#0AH,PF 0 MOV 70H,#00H
INC 71H MOV A,71H CJNE A,#06H,PF MOV 71H,#00H
INC 72H MOV A,72H CJNE A,#0AH,PF MOV 72H,#00H
INC 73H MOV A,73H CJNE A,#06H,PF MOV 73H,#00H
PF:POP TL0 POP TH0 POP ACC POP PSW RETI YS:MOV R7,#00H DJNZ R7,$ RET
END
|