In this program we will see how to transfer a 4-byte block from one location to another location.
Write 8086 Assembly language program to transfer a four-byte block from one memory section to another memory section. The numbers are stored at memory offset 500 – 503.
Here we are initially setting up the source index register with the source of data blocks, then set the destination index register to store into another block. Then set the Data segment register and Extra Segment register to 0000H. By using MOVSB instruction, the entire block is transferred from one location to another. As the size is 4-byte, we have set the counter register (CX) as 04H. Until the CX register turns to 0, the data will be shifted.