Program : A program to move a string of the data words from offset 2000H to offset 3000H the length of the string is OFH.
For writing this program, we will use an significant facility, available in the 8086 instruction set, for example move string byte/word instruction. We will also study the flexibility imparted by this instructions to the 8086 assembly language program. First write the Program for 8085, supposing that the string is available at location 2000H and is to be moved at 3000 H.
Now consider DS is suitably set, write the sequence for 8086. At first by using the index registers, the program may be written as given.
BY Comparing the above listings for 8085 and 8086 we can conclude that every instruction in 8085 listing is replaced by an alike instruction of 8086. The above 8086 listing is completely correct but it is not competent. Let us try to write the listings for the similar purpose by using the string instruction. Due to the assembler directives and the syntax, one may sense that the program is lengthy, though it eliminates 4 instructions for a MOVSW instruction.