ORG 0000H
MOV DPTR,#2000H
MOV R7,#0
LOOP:
MOVX A,@DPTR
PUSH ACC
MOV A,DPH
ADD A,#20H
MOV DPH,A
POP ACC
MOVX @DPTR,A
MOV A,DPH
CLR C
SUBB A,#20H
MOV DPH,A
INC DPTR
DJNZ R7,LOOP
SJMP $
END
mov dptr,#2000h
loop:
movx a,@dptr
mov dph,#40h
movx @dptr,a
mov dph,#20h
inc dptr
mov a,dpl
jnz loop
end