Question: Write an ARM assembly subroutine called negative that converts any positive element in the array into a negative value, and write the ARM main code

 Write an ARM assembly subroutine called negative that converts any positive

Write an ARM assembly subroutine called negative that converts any positive element in the array into a negative value, and write the ARM main code to test your subroutine. Also, let your subroutine count the number of elements found in the array and save it in RO. Test your code with the following data: ARY DCD 2,-51, 3, 6, 23, 1, -79 Requirements: Parameter: Put in RO = Array starting address. Returned value: ORO = the count of the array O ARY (converted to negative values) Register preservation: The subroutine must preserve any register other than RO. Write the code in upper case. Comment your code with short notes only. Do your best to make the code most efficient in terms of clock cycles and number of registers. Put text-copy of your code. Put a screenshot of memory content before and after storing the result. Put a screenshot of RO showing the count of array elements. List the cost parameters, i.e. number of instructions, registers, clock cycles of your program

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!