ORG 0000H
LJMP MAIN
ORG 000BH
LCALL TIMER0
ORG 1000H
MAIN:
LCALL INIT
WAIT :
CJNE R0,#10,WAIT
MOV R0,#0
RRC A
MOV P1,A
SJMP WAIT
INIT
MOV TMOD,#01H
MOV TH0,#3CH
MOV TL0,#B0H
SETB EA
SETB ET0
SETB TR0
MOV A,#01H
MOV P1,A
RET
TIMER0:
MOV TH0,#3CH
MOV TL0,#B0H
INC R0
RETI