Assembly Code for Block Transfer in 8051 - AT89c51
Flow Chart:-
Program :-
ORG 0000H
MOV R1,#50H
MOV DPTR,#2000H
CLR A
MOVX A, @DPTR
MOV R2,A
MOV R3, A
INC DPTR
LOOP 1:MOVX A,@DPTR
Mov @R1,A
INC DPTR
INC R1
DJNZ R2, LOOP1
MOV R1,#50H
MOV DPTR,#2050H
LOOP2: MOV A, @R1
MOVX DPTR,A
INC DPTR
INC R1
DJNZ R3, LOOP2
SJMP $
END
Output:-
For more ASM programs - click here