ORG 2000H
MOV R0,09H
MOV R1,#20H
MOV A,@R1
LOOP1: MOV R3,A
CLR CY
INC R1
SUBB A,R1
JNC LOOP2
MOV A,@R1
SJMP LOOP3
LOOP2: MOV A,R3
LOOP3: DJNZ R0,LOOP1
MOV 30H,A
SJMP $
END