You are to create and test a short assembly language program to perform the following computation....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are to create and test a short assembly language program to perform the following computation. Yoda = (Leia - Han) + (Luke - 123) A. Create a .data section and allocate space for one 32-bit word for each of the four variables Leia, Han, Luke, and Yoda (in that order). In your memory allocation directives, specify initial values as follows: Leia = 400, Han = 550, Luke = 200, Yoda = 0 B. The program is to use a separate memory pointer register value for each variable, to read/write the variables. (Example: LDR r0,[r1] where r1 contains the memory address.) C. In the debugger, open a Memory Monitor and select an appropriate "rendering" (signed decimal format is recommended for this exercise) to view and display the values of the data beginning at address Ox2000000. D. Open an Expressions view and display the values of the four variables Leia, Han, Luke, and Yoda. Again select an appropriate format for this data (ex. signed decimal.) E. Execute the program one step at a time, studying the values of the registers, memory locations, and expressions. F. After executing the last instruction, do a screen capture of the Memory and Expressions views and highlight or circle the final value of variable Yoda. Also, hand-calculate the result, write your answer on one of the captured views, and indicate whether it matches the result produced by the program. Submit these captured, annotated debug views with your source program. G. Optional (but recommended) - Reset the program and, after it pauses at main, use GDB commands to change the values of the variables, rerun the program, and verify the results for these new values. 1. The use of GDB commands is described in section F of the Debugging tutorial. 2. GDB commands are entered in the Debugger Console view. For example: set "(int ") &Leia = 200 3. You may enter individual commands to set the value of each variable or execute the commands from a command file (described in section G of the tutorial.) You are to create and test a short assembly language program to perform the following computation. Yoda = (Leia - Han) + (Luke - 123) A. Create a .data section and allocate space for one 32-bit word for each of the four variables Leia, Han, Luke, and Yoda (in that order). In your memory allocation directives, specify initial values as follows: Leia = 400, Han = 550, Luke = 200, Yoda = 0 B. The program is to use a separate memory pointer register value for each variable, to read/write the variables. (Example: LDR r0,[r1] where r1 contains the memory address.) C. In the debugger, open a Memory Monitor and select an appropriate "rendering" (signed decimal format is recommended for this exercise) to view and display the values of the data beginning at address Ox2000000. D. Open an Expressions view and display the values of the four variables Leia, Han, Luke, and Yoda. Again select an appropriate format for this data (ex. signed decimal.) E. Execute the program one step at a time, studying the values of the registers, memory locations, and expressions. F. After executing the last instruction, do a screen capture of the Memory and Expressions views and highlight or circle the final value of variable Yoda. Also, hand-calculate the result, write your answer on one of the captured views, and indicate whether it matches the result produced by the program. Submit these captured, annotated debug views with your source program. G. Optional (but recommended) - Reset the program and, after it pauses at main, use GDB commands to change the values of the variables, rerun the program, and verify the results for these new values. 1. The use of GDB commands is described in section F of the Debugging tutorial. 2. GDB commands are entered in the Debugger Console view. For example: set "(int ") &Leia = 200 3. You may enter individual commands to set the value of each variable or execute the commands from a command file (described in section G of the tutorial.)
Expert Answer:
Answer rating: 100% (QA)
The image provided appears to be an assignment or exercise for writing a simple assembly language program that performs the following computation Yoda ... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
A company is considering 2 alternative investment proposals. The first proposal calls for total replacement of the company's machines and equipment, while the second proposal involves repairing some...
-
Calculate the NCH/PPD with the midnight census being 25 when the staffing was the following from 12 midnight to 12 noon: (use up to two decimal places)
-
What are two important limitations of the Heckscher- Ohlin theory?
-
Determine the angle at which P should act on the block so that the magnitude of P is as small as possible to begin pulling the block up the incline. What is the corresponding value of P? The block...
-
A 0.15% C steel is to be carburized at 1100 C, giving 0.35% C at a distance of 1 mm beneath the surface. If the surface composition is maintained at 0.90% C, what time (in hours) is required? D= 1.85...
-
Data 2.7 on page 95 introduces the dataset HollywoodMovies, which contains information on more than 900 movies that came out of Hollywood between 2007 and 2013. We will consider this the population...
-
Listed below are the eight activity cost pools used by Charvez Corporation. Production set-up costs Heating costs Machinery power costs Purchasing department costs Maintenance costs Design and...
-
Scot and Vidia, married taxpayers, earn $272,000 in taxable income and $9,800 in interest from an investment in City of Tampa bonds. Using the U.S. tax rate schedule for married filing jointly, how...
-
Force on a surface of arbitrary orientation? (Figure 1D.2) Consider the material within an element of volume OABC that is in a state of equilibrium, so that the sum of the forces acting on the...
-
Blossom Ltd. purchased a building on January 1, 2018 for $15,240,000. Blossom accounted for this asset using the revaluation model and revalued the building every two years. The building was...
-
A quality-control manager randomly selects 70 bottles of ketchup that were filled on July 17 to assess the calibration of the filling machine. A research objective is presented. For each, identify...
-
Suppose you are conducting a survey regarding violence in hockey in a youth hockey league. You obtain a cluster sample of 10 hockey teams within a youth hockey league and sample all hockey players in...
-
Let \(Y\) be distributed according to the gamma(12 4) distribution. (a) Find \(\mathrm{E}[Y]\). (b) Find \(\operatorname{Var}[Y]\). (c) Find \(P(Y\)
-
Amount of money spent on computers this year Classify the variable as qualitative or quantitative.
-
The average score for a class of 28 students taking a calculus midterm exam was 72%. Determine whether the underlined value is a parameter or a statistic.
-
The damping ratio and peak overshoot are measures of: Select one: O a. Absolute stability b. Relative stability c. Speed of response d. Steady state error
-
Refer to the data for problem 13-36 regarding Long Beach Pharmaceutical Company. Required: Compute each division's residual income for the year under each of the following assumptions about the...
-
Suit by plaintiff, Madison Square Garden Corporation, against Primo Carnera, defendant. From an order granting an injunction against defendant, defendant appeals. On January 13, 1931, the plaintiff...
-
On November 4, Kim contracted to sell to Lynn 500 sacks of flour at $4 each to be delivered to Lynn by December 12. On November 27, Kim shipped the flour. By December 5, when the shipment arrived,...
-
This is a stocklist case arising under 220(b) of our [Delaware] General Corporation Law. The issue is whether a shareholder states a proper purpose for inspection under our statute in seeking to...
-
Test for misspecification using RESET.
-
a. Show that the mean-squared forecast error \(E\left[\left(\hat{y}_{T+1}-y_{T+1} ight)^{2} \mid I_{T} ight]\) for a forecast \(\hat{y}_{T+1}\), that depends only on past information \(I_{T}\), can...
-
Consider the AR(1) model \(y_{t}=\delta+\theta y_{t-1}+e_{t}\) where \(|\theta|)=0\) and \(\operatorname{var}\left(e_{t} \mid I_{t-1} ight)=\sigma^{2}\). Let \(\bar{y}_{-1}=\sum_{t=2}^{T} y_{t}...
Study smarter with the SolutionInn App