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 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.
Using Irvine32.inc in microprocessor assembly language for Intel x86 processor. Please provide output screen.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
