Question
Write an assembly language program in LEGv8 (or ARMv8) to find the largest and smallest of n non-zero positive integers. Declare data sections to store
Write an assembly language program in LEGv8 (or ARMv8) to find the largest and smallest of n non-zero positive integers. Declare data sections to store the n positive values as an array and a variable to store n. Create a loop to go through the array for finding largest and smallest numbers. You can use two registers for storing the largest and smallest numbers (say X9 and X10). You can assume that all numbers are greater than zero and none of the numbers are larger than 1000. Then, compute the sum of the n positive integers, storing the result in X11, and compute the average of n positive integers, storing the result in X12.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started