Movsw/movsb-string manipulation instruction-microprocessor, Assembly Language

MOVSW/MOVSB : Move String Word or String Byte: Imagine a string of bytes, stored in a set  of consecutive memory locations is to be moved to another set of  the destination locations. Starting byte of the source string is located in the memory location whose address can be computed by using DS (data segment) and SI (source index) contents. Starting address of the destination locations where this string has to be relocated is given by ES (extra segment) and Dl (destination index) contents. Starting address of the source string is 10H*DS+[SI],  whereas the starting  address of the destination  string is 10H*ES+[DI].  The MOVSB/MOVSW instruction therefore, moves a string of bytes/ words pointed to by DS: SI pair (source) to the memory location pointed to by ES: Dl pair (destination).  The REP instruction prefix is utilized with MOVS instruction to repeat it by a value given in the register counter (CX). The length of word string or byte string ought to be stored in register CX register. Flags are remaining unaffected by this instruction.

After the MOVS instruction is executed, the index registers are automatically updated and register CX is decremented. The decrementing or incrementing of the pointers, for example DI and Sl depend on the direction flag DF. If flag DF is 0, the index registers are incremented, or else, they are decremented, in all casa of the string manipulation instructions. Following string of instructions explain the execution of the MOVS instruction.

Example :


Posted Date: 10/12/2012 3:27:51 AM | Location : United States

Related Discussions:- Movsw/movsb-string manipulation instruction-microprocessor, Assignment Help, Ask Question on Movsw/movsb-string manipulation instruction-microprocessor, Get Answer, Expert's Help, Movsw/movsb-string manipulation instruction-microprocessor Discussions

Write discussion on Movsw/movsb-string manipulation instruction-microprocessor
Your posts are moderated
Related Questions
) What is the difference between re-locatable program and re-locatable data?

Pin diagram of 8088 : The pin diagram of 8088 is shown in given figure. Most of the 8088 pins and their functions are exactly similar to the corresponding pins of 8086.  Hence

Example : Add the contents of the 2000H: 0500H memory location to contents of 3000H: 0600H and store the result in 5000H: 0700H. Solution : Unlike the past example progra

Computes the integral square root: Problem: Square Root:   For this problem you will write a short assembly program that computes the integral square root of an input numb

SEG : Segment of a Label:- The SEG operator is which is used to decide the segment address of the, variable, label or procedure and substitutes the segment base address in plac

There are two parts to this assignment. The first part has you reading 4 integers representing; #QUARTERS, #DIMES, #NICKELS & #PENNIES, respectively. Your program should compute t

The modes are determined by the contents of the control register, whose format is given in Figure These modes are: Mode 0: If a group is in mode 0, it is divided into 2 sets.

Write a program that defines symbolic constants for all of the days of the week

errorlevel -302 ;prevents error code for this chipset __config 0x373A ;chip config PIC spec page 146 processor 16F877A ;chipset reset code

Power Pc : A Power PC is a microprocessor designed to meet a standard, which was combining designed by Motorola, Apple and IBM. The PowerPC standard specifies a common instruc