Program to move string from offset-assembly program, Assembly Language

Program : A program to move a string of the data words from offset 2000H to offset 3000H the length of the string is OFH.

Solution :

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.

786_program4.jpg

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.

1453_program5.jpg

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.

140_program6.jpg

Posted Date: 10/12/2012 8:02:46 AM | Location : United States







Related Discussions:- Program to move string from offset-assembly program, Assignment Help, Ask Question on Program to move string from offset-assembly program, Get Answer, Expert's Help, Program to move string from offset-assembly program Discussions

Write discussion on Program to move string from offset-assembly program
Your posts are moderated
Related Questions
CMPS : Compare String Byte or String Word:-The CMPS instruction may be utilized to compare two strings of Words or byte. The length of the string ought to be stored in the CX. If

This is a short program to practice assembly language loops and if/else statements. You will use various jump commands and the cmp instruction. The program will generate a random

Physical Memory Mapped I/O and Port I/O : CPU controlled I/O comes in 2 ways. Simply the difference is whether we utilize the normal memory addresses for I/O, this is mention

ROL : Rotate Left without Carry: This instruction rotates the content of the destination operand to the left by the specified count bit-wise excluding the carry. The most signific

Execution Unit (EU) and Bus Interface Unit (BIU) : 8086 consist of two processors called EU and BIU. Two Processors can work parallel. This improves speed of execution. BIU fi

DMA DMA stands for Direct Memory Access It is uses same Address/Data lines on ISA bus It controls the ISA bus instead of the processor ("bus master") Floppy

NEG: Negate:- The negate instruction forms the 2's complement of the particular destination in the instruction. For obtaining 2's complement, it subtracts the contents of destinat

Declare 1 constant. This can be done just below the prototype section. Put the following divider above the constant section. ;************************ Constants ****************


SHL/SAL : Shift logical/Arithmetic Left: These instructions shift the operand byte or word bit by bit to the left and insert 0 in the newly introduced least significant bits. In c