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

Assignment Help:

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 :

1000_movsb.jpg


Related Discussions:- Movsw/movsb-string manipulation instruction-microprocessor

Programming assembly language, Write an 8086 program to find out the number...

Write an 8086 program to find out the number of positive numbers and negative numbers from a given series of signed numbers include flow chart ..

Relocate program and data, ) What is the difference between re-locatable pr...

) What is the difference between re-locatable program and re-locatable data?

8251 programmable/communication interface-microprocessor, 8251 Programmable...

8251 Programmable/Communication Interface As an instance of a serial interface device let us suppose Intel's 8251 A programmable communication interfaces. The 8251A is diagram

Program help, Could I get an estimate on how much it would cost to write a ...

Could I get an estimate on how much it would cost to write a program in assembly language?

Program to evaluate equation, Write a program to evaluate the following exp...

Write a program to evaluate the following expression. You are to evaluate the following equation: num1 - (input + num2) - (num3 + num4) Input will be a hex number input by

Progframmw, write a programme the addition two 3*3 matrix and stored in fro...

write a programme the addition two 3*3 matrix and stored in from list

Assembler directives and operators-microprocessor, Assembler Directives and...

Assembler Directives and Operators The major advantage of machine language programming is directly that the memory control is in the hands of the programmer, so that, he can be

Interrupt system based on multiple 8259as-microprocessor, Interrupt System ...

Interrupt System Based on Multiple 8259As A multiple 8259A interrupt system is diagrammed in given figure in this figure data bus drivers are not indicated, but they could be i

Sub-arithmetic instruction-microprocessor, SUB: Subtract :- The subtract in...

SUB: Subtract :- The subtract instruction subtracts the source operand from destination operand and result is left in the destination operand. Source operand might be memory locati

Software interrupts-microprocessor, Software Interrupts Software interr...

Software Interrupts Software interrupts are the result of an INT instruction in an executed program.  It may be assumed as a programmer triggered event that immediately stops e

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd