Lods-stos-string manipulating instruction-microprocessor, Assembly Language

Assignment Help:

LODS : Load String Byte or String Word:-

The LODS instruction loads AL/AX register by the content of a string pointed to by DS:SI register pair. The SI is automatically modified depending on the DF. If it is a byte transfer (LODSB), SI is modified by one and if it is a word transfer (LODSW), the SI is modified by two. No other flags are changed by this instruction.

STOS : Store String Byte or String Word:-

The STOS instruction stores the AL/AX register contents to a location in the string pointed by theES: Dl register pair. Accordingly the Dl is modified. No flags are changed by this instruction. The direction flag controls the string instruction execution. The source index (SI) and destination index (D1) are automatically modified after each iteration. If the DF = 1, then the execution follows auto decrement mode. In this mode, DI and Sl are decremented automatically after each iteration (by 1 or 2 depending on the word or byte operations). Hence, in auto decrementing mode, the strings are mention to by their ending addresses. If the DF = 0, then the execution follows autoincrement mode. In this mode, D1 and S1 are incremented automatically (by 1 or 2 depending on word or byte operation) after each iteration, so in this case, the strings are mention to by their starting addresses.


Related Discussions:- Lods-stos-string manipulating instruction-microprocessor

#procedure, #Write a function to calculate the following arithmetic operati...

#Write a function to calculate the following arithmetic operation and return the result. A = 2 + (3x)3 + y/2n (x, y and n are arguments of the function where x is an integer in the

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

StrNCpyAsm, ;StrNCpyAsm - copy zero terminated string2 to zero terminated s...

;StrNCpyAsm - copy zero terminated string2 to zero terminated string1, ; but copy no more than count (parameter) characters ; or the length of string2, whi

Assignment, Write an assembly program that adds the elements in the odd ind...

Write an assembly program that adds the elements in the odd indices of the following array. Use LOOP. What is the final value in the register?

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

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

Copy a string backwards, I can get it to copy the string but can''t get it ...

I can get it to copy the string but can''t get it to reverse it.

Base convertor, take an integer and its base and the base in which you want...

take an integer and its base and the base in which you want to convert the number from user and perform conversion.

Write a assembly language subroutine, Write a M68000 assembly language subr...

Write a M68000 assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n

Program., write a Mips program that read a string AND PRINT IT ON THE SCREE...

write a Mips program that read a string AND PRINT IT ON THE SCREEN

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

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