Question: copy a string (string 2) to string 1 in reverse in assembly language, x86. For example, str2 is I can read,0 and str1 is daer

copy a string (string 2) to string 1 in reverse in assembly language, x86. For example, str2 is "I can read",0 and str1 is "daer nac I",0.

I am told to get to the end of the second string so esi contains the address of the last character in the second string and to populate edi with str1

Using a loop, I have to use lodsb to copy a char from str2 to al and stosb to copy the char from al to str1

Loop eceutes as the length of str2 excluding the terminating 0

After loop exits, zero terminate reversed string

Thanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!