ORG 0000H
MOV SP,#60H
MOV TL1,#00H
MOV R1,#00H
MOV R2,#00H
MOV R3,#00H
MOV R4,#00H
MOV R5,#00H
SETB TR1
START:MOV TL1,#00H
INC R1
CJNE R1,#0AH,START
MOV R1,#00H
LOOP1:INC R2
CJNE R2,#0AH,START
MOV R2,#00H
LOOP2:INC R3
CJNE R3,#0AH,START
MOV R3,#00H
LOOP3:INC R4
CJNE R4,#0AH,START
MOV R4,#00H
LOOP4:INC R5
CJNE R5,#05H,START
MOV R5,#00H
MOV A,R1
MOV P2,#04H
LCALL DISPLAY
MOV P2,#0FFH
MOV A,R2
MOV P2,#03H
LCALL DISPLAY
MOV P2,#0FFH
MOV A,R3
MOV P2,#02H
LCALL DISPLAY
MOV P2,#0FFH
MOV A,R4
MOV P2,#01H
LCALL DISPLAY
MOV P2,#0FFH
MOV A,R5
MOV P2,#00H
LCALL DISPLAY
MOV P2,#0FFH
AJMP START
DISPLAY:MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P0,A
DL: MOV R7,#0A0H
DJNZ R7,$
RET
TAB:DB 0C0H, 0F9H, 0A4H, 0B0H, 099H, 092H, 082H, 0F8H, 080H, 090H
END