Question: Create a procedure that returns the sum of all elements in an array that fall within a given range [a, b] inclusive on both ends.
Create a procedure that returns the sum of all elements in an array that fall within a given range [a, b] inclusive on both ends. Create a program in assembly code that tests your procedure at least twice.
Inputs to your procedure: Pointer to a signed doubleword array Size of the array Value for a (start point in the array) Value for b (end point in the array)
Return the sum in the EAX register Preserve all other register values and replace them to their previous states prior to returning from the procedure.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
