ORG 00H
SJMP STAR
ORG 1BH
SJMP T1S
ORG 30H
STAR: MOV R2,#99
MOV R4,#20
MOV IE,#88H
MOV TMOD,#10H
MOV TH1,#3CH
MOV TL1,#0B0H
SETB TR1
MOV A,R2
MOV B,#10
DIV AB
ACALL SEG7
MOV P1,A
MOV A,B
ACALL SEG7
MOV P2,A
SJMP $
SJMP STAR
T1S: MOV TH1,#3CH
MOV TL1,#0B0H
DJNZ R4,T1S0
MOV R4,#20
DJNZ R2,T1S1
/*CLR TR1*/
SJMP T1S1
T1S0: RETI
T1S1: MOV A,R2
MOV B,#10
DIV AB
ACALL SEG7
MOV P1,A
MOV A,B
ACALL SEG7
MOV P2,A
CJNE R2,#0,T1S2
MOV R2,#100
T1S2: RETI
SEG7: INC A
MOVC A,@A+PC
RET
DB 0C0H,0F9H,0A4H,0B0H
DB 99H,92H,82H,0F8H
DB 80H,90H,88H,83H
DB 0C6H,0A1H,86H,8EH
END