Write (and test using DS5) an assembly language program in ARMv8 to find the sum, the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write (and test using DS5) an assembly language program in ARMv8 to find the sum, the largest and the smallest of n non-zero positive integers. Declare data sections to store the n positive values as an array v and a variable to store n. Create a loop to go through the array for finding the sum of the elements of the array, the largest and the smallest numbers. Store sum in register X8, largest and smallest values in X9, X10 respectively. Test input: n=8; the eight positive integers are: 79, 55, 94, 48, 19, 13, 45, 21 Submit (Required): a) A file containing your assembly code (.S file) b). A read me file on how to execute. Indicate your use of registers. c). At least two screen shots, showing register values before executing the first instruction in your code and a screen shot showing the register contents after the last instruction is executed (to show results) Write (and test using DS5) an assembly language program in ARMv8 to find the sum, the largest and the smallest of n non-zero positive integers. Declare data sections to store the n positive values as an array v and a variable to store n. Create a loop to go through the array for finding the sum of the elements of the array, the largest and the smallest numbers. Store sum in register X8, largest and smallest values in X9, X10 respectively. Test input: n=8; the eight positive integers are: 79, 55, 94, 48, 19, 13, 45, 21 Submit (Required): a) A file containing your assembly code (.S file) b). A read me file on how to execute. Indicate your use of registers. c). At least two screen shots, showing register values before executing the first instruction in your code and a screen shot showing the register contents after the last instruction is executed (to show results)
Expert Answer:
Answer rating: 100% (QA)
Heres a simple ARMv8 assembly code in the GAS GNU Assembler syntax global start section data n word ... View the full answer
Related Book For
Computer Organization And Design The Hardware Software Interface
ISBN: 9780123747501
4th Revised Edition
Authors: David A. Patterson, John L. Hennessy
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Your client has provided another investment which pays the following cash flows (with the payments being timed relative to 'today'): $3,500 in 12 months, $3,000 in 4 years, $3,000 in 5 years, $9,000...
-
Factor the given expressions completely. 3a 3b
-
Negative charge -Q is distributed uniformly over the surface of a thin spherical insulating shell with radius R. Calculate the force (magnitude and direction) that the shell exerts on a positive...
-
On July 4, 2012, you convert $500,000 U.S. dollars to Japanese yen in the spot foreign exchange market and purchase a one-month forward contract to convert yen into dollars. How much will you receive...
-
Describe the six categories of early warning signs of potential fraud.
-
The following transactions relate to the General Fund of the City of Buffalo Falls for the year ended December 31, 2012: 1. Beginning balances were: Cash, $150,000; Taxes Receivable, $200,000;...
-
Complete a detailed Income Statement using the information from the Trial Balance. Make sure to list out all accounts you use to complete the Income Statement. TRIAL BALANCE AS OF DECEMBER 31, 20XX...
-
Your client, Summerford, Inc., has a debt agreement with Valley City Bank that includes a number of restrictions and covenants. Violation of any restriction or covenant results in the entire amount...
-
Suppose that the City of Dallas builds a parking lot in downtown by issuing a bond for $5 million. The bond pays a 5 percent coupon, tax-free. The bond's interest payments are paid from the revenue...
-
Research OFFICE DEPOT Inc using news reports; its website/publications; and government, professional, or scholarly sources. Discuss the company's track record on economic justice and equity. Define...
-
- Given the following data for a company: Equity E 800,000 USD -Debt D=200,000 USD - Invested Capital IC = 1,000,000 USD E/IC-80% - D/IC=20% -Cost of debt k=9% - Beta-1.6 - D/E=0.25 compute the cost...
-
Read the following Why do you agree with James 1. Overfishing takes short-term self interest against the common good. It provides an opportunity for an individual to benefit oneself while spreading...
-
Penn Corp. is analyzing the possible acquisition of Teller Company. Both firms have no debt. Penn believes the acquisition will increase its total aftertax annual cash flow by $1.9 million...
-
Write up a general supply function for housing (specify the variables mentioned in this article that impact the supply side of the market-note-there are some variables mentioned that are not included...
-
The cost of sampling product quality is an example of a unit-level cost. T/F A company produces paint that goes through two departments, Department A and Department B. Expected costs and activities...
-
Is that Yelp review real or fake? The article A Framework for Fake Review Detection in Online Consumer Electronics Retailers (Information Processing and Management 2019: 12341244) tested five...
-
Which existing blocks (if any) can be used for this instruction? The basic single-cycle MIPS implementation in Figure 4.2 can only implement some instructions. New instructions can be added to an...
-
List the inal state of the cache, with each valid entry represented as a record of . Starting from power on, the following byte-addressed cache references are recorded. Address O 4 16 132 232 160...
-
What CPI would be achieved if the MIPS version of this loop is executed on a 1-issue processor with dynamic scheduling? Assume that our processor is not doing register renaming, so you can only...
-
Emily throws a soccer ball out of her dorm window to Allison, who is waiting below to catch it. If Emily throws the ball at an angle of 30 below horizontal with a speed of 12 m/s, how far from the...
-
In the 2016 Olympics in Rio, after the 50 m freestyle competition, a problem with the pool was found. In lane 1 there was a gentle 1.2 cm/s current flowing in the direction that the swimmers were...
-
In punting a football, the kicker tries to maximize both the distance of the kick and its hang timethe time that the ball is in the air. A kicker gets off a great punt with a hang time of 5.0 s that...
Study smarter with the SolutionInn App