How is storage space for local variables created in the stack? A swap procedure can exchange two elements (pointed to by ESI and EDI) of an array using xchg EAX,[EDI] xchg EAX,[ESI] xchg EAX,[EDI]...



How is storage space for local variables created in the stack?



A swap procedure can exchange two elements (pointed to by ESI and EDI) of an array


using


xchg EAX,[EDI]


xchg EAX,[ESI]


xchg EAX,[EDI]


The above code preserves the contents of the EAX register. This code requires six memory accesses. Can we do better than this in terms of the number of memory accesses if


we save and restore the EAX using push and pop stack operations?



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here