Program to transfer data from memory block B1 to B2

Write out the assembly language program in order to transfer the data from the memory block B1 to the memory block B2?

E

Expert

Verified

MVI C, 0AH; Initialize the counter.
LXI H, 2200H; Initialize the source memory pointer.
LXI D, 2300H; Initialize destination memory pointer
Loop: MOV A, M; Get byte from source memory block.
STAX D; Store byte within destination memory block
INX H; Increment the source memory pointer
INX D; Increment the destination memory pointer
DCR C; Decrement the counter
JNZ Loop; in case, counter ≠ 0 repeat
HLT

   Related Questions in Electrical Engineering

©TutorsGlobe All rights reserved 2022-2023.