START:
MOV DPTR,# 7FFFH
MOV A,#0Dl H
MOVX DPTR,A
WAIT:
MOVX A,@DPTR
JB ACC. 7,WAIT
MOV A,#2AH
MOVX DPTR,A
MOV A,#00H
MOVX DPTR,A
MOV R0,#30H
MOV R7,#08H
MOV A,#90H
MOVX @DPTR,A
MOV DPTR,#7FFEH
LOOP1:
MOV A,R0
MOVX @DPTR,A
INC R0
DJNZ R7,LOOPl
MOV R0,#40H
MOV R7,#10H
LOOP2:
MOV DPTR,#7FFFH
LOOP3:
MOVX A,@DPTR
ANL A,#OFH
JZ LOOP3
MOV A,#40H
MOVX DPTR,A
MOV DPTR,#7FFEH
MOVX A,DPTR
ANL A,#3FH
MOV @R0,A
INC R0
DJNZ R7,LOOP2
HERE:
SJMP HERE
RET