Question: ( c ) Listing Q 3 a is the assembly language code for a version of the memcpy function commonly used in C programs. The
c Listing Qa is the assembly language code for a version of the memcpy function commonly used in C programs. The function copies n bytes from the source location src to the destination location dest
a What happens when each line of this function is executed?
marks
b Identify an example of each of the following addressing modes in this function:
i Immediate
ii Register indirect
marks
c If the stack pointer contains x on entry to this function, what address will the PUSH instruction save a copy of the link register to
marks
d You have a byte block of data at memory address x that you would like to copy to address x How would you set up the registers and call upon this function to do this for you.
marks
e How would you modify this function so that it returns the address of the destination buffer in R
marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
