Question: 1- Write a program to use string instructions to change all the s characters in a string to p. You must use scasb to locate

1- Write a program to use string instructions to change all the s characters in a string to p. You must use scasb to locate the character. Cut and paste the array in memory to show your code is working.

2- Write a program to copy one array of size 24 to another array of size 24 using string instructions. Write 3 versions of this code. One code must copy byte at a time. One code must copy word at a time and one code must copy double word at a time. Cut and paste the array in memory to show your code is working.

3- Assume we have a C program that has a function that accepts 4 integer values and finds the max of these values and return max. Write the same procedure in assembly language. The main code of the assembly language mustpass the 4 values using the stack and then call the procedure max. You should have a local variable in procedure max for finding the maximum of the 4 numbers. Use ebp register in the procedure and show the cut and paste of memory to show the array. Cut and paste the stack before the function call and after the function call and explain all the values such as the return address and passed values.

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!