START3:
MOV TMOD,#22H
MOV TH1,#0FDH
MOV TH0,#0A0H
MOV IE,#10XXXX1XB
MOV IP,#2
MOV SP,#0CAH
MOV 7EH, #DATA2
MOV 7FH, #0
SETB TR0
SJMP $
T0SV:
PUSH ACC
PUSH PSW
PUSH 0
MOV R0,7EH
MOV A,7FH
CJNE A, #10,$+5
SJMP SND10
JNZ SND9
SND0:
CLR P1.0
SJMP SVCOM
SND9:
CJNE A, #9,SND18
SETB P1.0
MOV 7FH, #0
INC 7EH
CJNE @R0, #0AH,SVCOM1
MOV 7FH, #10
SJMP SVCOM1
SND10:
SETB 7EH
SND11:
CLR TR0
MOV 7FH, #0
MOV 7EH, #DATA2
SJMP SVCOM1
SENDER:
SETB 7DH
SJMP SND11
SND18:
JNC SENDER
MOV A,@R0
MOV C,ACC.0
MOV P1.0,C
RR A
MOV @R0,A
MOV 7EH,R0
SVCOM:
INC 7FH
SVCOM1:
POP 0
POP PSW
POP ACC
RETI