设计一个3位十进制计数器,可对外部脉冲进行计数,并在数码管上实时显示计数值,程序仿真显示000,没有流动计数,请各位前辈帮帮忙,新手求指教
ORG 0000HLJMP MAIN
ORG 000BH
LJMP IT0P
ORG 0100H
MAIN: MOV SP,#60H
MOV TMOD,#61H
MOV TL0,#0B0H
MOV TH0,#3CH
SETB ET0
MOV TL1,#00H
MOV TH1,#00H
SETB ET1
SETB TR0
SETB EA
JNB P3.2,W
CLR TR1
W:SETB TR1
LCALL CZ
CZ:MOV A,TL1
MOV B,#100
DIV AB
MOV 30H,A
MOV A,B
MOV B,#10
DIV AB
MOV 31H,A
MOV 32H,B
LCALL DISP
IT0P: MOV TL0,#0B0H
MOV TH0,#3CH
CPL P3.0
RETI
DISP:MOV R0,#30H
MOV R2,#0FBH
MOV R3,#0FFH
DISP1:MOV A,#0FFH
MOV P1,A
MOV A,@R0
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P2,A
MOV A,R2
MOV P1,A
DISP2:DJNZ R3,DISP2
INC R0
MOV A,R2
CLR C
RR A
MOV R2,A
JB ACC.7,DISP1
RET
TABLE:DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH
DB 6FH,77H,7CH,39H,5EH,79H,71H,00H,40H,0F3H
END