We learned 64-bit logical shift left in the class. By using a similar approach, write an...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
We learned 64-bit logical shift left in the class. By using a similar approach, write an assembly program that rotates an unsigned 64-bit data to the right (ROR on 64-bit input). Assume that the lower word and upper word of the 64-bit input are in R0 and R1, respectively. Also assume that the rotation amount is given via R2 and R2 is guaranteed to be less than 32 (no need to compare R2 with 32). Solve this problem with pen and paper. You don't need to run and debug the code with Keil tool or submit the source code separately. Just show the code that is similar to the code on page 23 of lecture slide 17. Write an ARM assembly language program that counts the number of 1's for any value in RO. The program must assemble/compile in KEIL and must be able to run in the KEIL simulator. Generally, RO may contain any value, but for purpose of this exercise, you may move 0x2345ABCD into RO. The number in RO does not need be preserved. You may use any other registers as you need. The result, total count of 1's in RO, should be in R1 when the program ends." UHCL: Unwala CENG 3371Microcontroller Programming Spring 2017 Copy the template below to your assembly file AREA Lab_08_YourFirstName_YourLastName, CODE, READONLY EXPORT __main _____main LDR RO,=0x2345ABCD; This is how you assign large value to RO.MOV will NOT work! stop B stop END Step 3: Change YourFirstName to your first name. Change YourLastName to your last name. Step 4: You are allowed to use ONLY the instructions below: 1 LDR[*] 2 MOV[*] 3. B[*]- ADC[*]. 4. 5. LSR[*] We learned 64-bit logical shift left in the class. By using a similar approach, write an assembly program that rotates an unsigned 64-bit data to the right (ROR on 64-bit input). Assume that the lower word and upper word of the 64-bit input are in R0 and R1, respectively. Also assume that the rotation amount is given via R2 and R2 is guaranteed to be less than 32 (no need to compare R2 with 32). Solve this problem with pen and paper. You don't need to run and debug the code with Keil tool or submit the source code separately. Just show the code that is similar to the code on page 23 of lecture slide 17. Write an ARM assembly language program that counts the number of 1's for any value in RO. The program must assemble/compile in KEIL and must be able to run in the KEIL simulator. Generally, RO may contain any value, but for purpose of this exercise, you may move 0x2345ABCD into RO. The number in RO does not need be preserved. You may use any other registers as you need. The result, total count of 1's in RO, should be in R1 when the program ends." UHCL: Unwala CENG 3371Microcontroller Programming Spring 2017 Copy the template below to your assembly file AREA Lab_08_YourFirstName_YourLastName, CODE, READONLY EXPORT __main _____main LDR RO,=0x2345ABCD; This is how you assign large value to RO.MOV will NOT work! stop B stop END Step 3: Change YourFirstName to your first name. Change YourLastName to your last name. Step 4: You are allowed to use ONLY the instructions below: 1 LDR[*] 2 MOV[*] 3. B[*]- ADC[*]. 4. 5. LSR[*]
Expert Answer:
Related Book For
Computer Organization and Design The Hardware Software Interface
ISBN: 978-0124077263
5th edition
Authors: David A. Patterson, John L. Hennessy
Posted Date:
Students also viewed these computer network questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
We have titrated natural water in which the primary buffering agent is carbonate species and understood how to predict the titration curve using the equilibrium constants of those weak acids. Plot...
-
A circular loop of wire rests on a table. A long, straight wire lies on this loop, directly over its center, as the drawing illustrates. The current I in the straight wire is decreasing. In what...
-
The capped end of a pipe in your basement springs a leak. The pipe has a diameter of \(50.0 \mathrm{~mm}\) and is attached to a joist so that it is \(2.00 \mathrm{~m}\) above the basement floor. The...
-
Obtain and read the joint AASBAUASB 2019 statement on climate-related and other emerging risks. What specific AASB/IFRS accounting standards might be affected by climate change risks?
-
1. What does Foot mean by saying that one cannot get on well without the virtues? 2. What is meant by saying that virtue is perfection of the will rather than of body or mind? 3. What is the problem...
-
using deal and grove formula, Create a matlab code to show the General relationship for thermal oxidation of silicon using dry oxidation and wet oxidation. The solid line represents the general...
-
Let us consider the a small village. The power network of the village is shown in Figure 1. Load demands at Zone A, Zone B and Zone C, are 5MVA (0.95pf lagging), 7MVA (0.94pf lagging) and 7MVA...
-
Explain why depending entirely on a corporation's annual report can be misleading.
-
Faith works for a large corporation, which has a small loan program for employees. Faith takes out a $10,000 loan to cover the cost of medical expenses not covered by her insurance. After a year, it...
-
A check digit is a way of verifying that a particular sequence of numbers has been entered correctly. They are found in many places; for example, bar codes, credit card account numbers, and...
-
1. What are the sources that cause the differences and similarities in technology or innovation development? 2. Explain the importance of managing technology. 3. Define Management of Innovation and...
-
1- explain the similarities and differences between double sideband suppressed carrier (DSB-SC) and double sideband transmitted carrier (DSC- TC) amplitude modulations in terms of: (a) the modulation...
-
WILL DO BRAINLIEST!!!! Suppose the store wants to earn a daily profit of $150 from the sale of soccer balls. To earn this profit, what price should the store charge for each soccer ball? Explain how...
-
The Purse Company produces a line of purses. The manager, Sally Smith, is interested in using a level aggregate plan. Inventories and back orders will be used to handle demand fluctuations. She has...
-
For the following exercises, find the area of the triangle. Round to the nearest hundredth. 22 50 36
-
When silicon chips are fabricated, defects in materials (e.g., silicon) and manufacturing errors can result in defective circuits. A very common defect is for one wire to affect the signal in...
-
For a direct-mapped cache design with a 32-bit address, the following bits of the address are used to access the cache. 1. What is the cache block size (in words)? 2. How many entries does the cache...
-
Translate the following C code to MIPS assembly code. Use a minimum number of instructions. Assume that the values of a, b, i, and j are in registers $s0, $s1, $t0, and $t1, respectively. Also,...
-
Calculate: (a) \(f=a /(b c)\), where \(a=2.34\mathrm{~mm}^{2}, b=54.26\mathrm{~m}\), and \(c=0.14\mu \mathrm{m}\); (b) \(g=k t^{3}\), where \(k=1.208\times 10^{-2}\mathrm{~s}^{-3}\) and...
-
Which of these is a hierarchical approach of subordination of individuals that work together and contribute to serve a common goal? Formal organization Informal structures Functional structure ...
-
Organization is viewed as a/an ________ process and a management activity, which is crucial for predicting the consumption of a companys resources. Active Passive Intermediary None of the above
Study smarter with the SolutionInn App