Exercise 6: Show the contents of the stack after the two marked points in the execution...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Exercise 6: Show the contents of the stack after the two marked points in the execution of the following code with the 32-bit registers. Assume initially that RO=0x0, R1=0x10, R2=0x202, R3=0x3003, R4=0x40004, R5=0x500005 and R6=0x6000006. The initial stack pointer is 0x20001008. You may also assume that the microcontroller is configured using Little Endian. PUSH {R4, R6} RO, R5, R3 EOR POP {R1, R2} LSL R5, R5, #2 ORR R2, R2, R3 AND R4, R4, R3 PUSH {R3, R1} A B a) What are the contents of the stack after the execution point A? Indicate the position of the stack pointer. Initial SP ----> 0x20001000 0x20001001 0x20001002 0x20001003 0x20001004 0x20001005 0x20001006 0x20001007 0x20001008 0x20001009 0x2000100A 0x2000100B 0x2000100C 0x2000100D 0x2000100E 0x2000100F 0x20001010 b) What are the contents of the stack after the execution point B? Indicate the position of the stack pointer. Initial SP 0x20001000 0x20001001 0x20001002 0x20001003 0x20001004 0x20001005 0x20001006 0x20001007 0x20001008 0x20001009 0x2000100A 0x2000100B 0x2000100C 0x2000100D 0x2000100E 0x2000100F 0x20001010 c) What are the final contents of the registers R0 to R6? RO R1 R2 R3 R4 R5 R6 Exercise 6: Show the contents of the stack after the two marked points in the execution of the following code with the 32-bit registers. Assume initially that RO=0x0, R1=0x10, R2=0x202, R3=0x3003, R4=0x40004, R5=0x500005 and R6=0x6000006. The initial stack pointer is 0x20001008. You may also assume that the microcontroller is configured using Little Endian. PUSH {R4, R6} RO, R5, R3 EOR POP {R1, R2} LSL R5, R5, #2 ORR R2, R2, R3 AND R4, R4, R3 PUSH {R3, R1} A B a) What are the contents of the stack after the execution point A? Indicate the position of the stack pointer. Initial SP ----> 0x20001000 0x20001001 0x20001002 0x20001003 0x20001004 0x20001005 0x20001006 0x20001007 0x20001008 0x20001009 0x2000100A 0x2000100B 0x2000100C 0x2000100D 0x2000100E 0x2000100F 0x20001010 b) What are the contents of the stack after the execution point B? Indicate the position of the stack pointer. Initial SP 0x20001000 0x20001001 0x20001002 0x20001003 0x20001004 0x20001005 0x20001006 0x20001007 0x20001008 0x20001009 0x2000100A 0x2000100B 0x2000100C 0x2000100D 0x2000100E 0x2000100F 0x20001010 c) What are the final contents of the registers R0 to R6? RO R1 R2 R3 R4 R5 R6
Expert Answer:
Answer rating: 100% (QA)
Explanationa In the first instruction R2 and R3 are pushed into stack stack pointer SP decrements ... View the full answer
Related Book For
Computer Architecture A Quantitative Approach
ISBN: 978-0123704900
4th edition
Authors: John L. Hennessy, David A. Patterson
Posted Date:
Students also viewed these programming questions
-
= Square Hammer Corporation shows the following information on its 2018 income statement: Sales = $197,000; Costs = $99,000; Other expenses = $6,000; Depreciation expense $9,100; Interest expense =...
-
Consider the top view of a robotic workstation, with the parts A and B as shown on the worktable with the reference points of the A (XA-4, YA=0.5, ZA= 0) and B (XB-1.5, YB= 1.5, ZB= 0). The...
-
Using a table similar to that shown in Figure 3.10, calculate 74 divided by 21 using the hardware described in Figure 3.11. You should show the contents of each register on each step. Assume A and B...
-
In Exercises 8586, find a. (f g)(x); b. (g f)(x); c. (f g)(3). f(x) = x 2 + 3, g(x) = 4x - 1
-
The researchers implement their weight loss intervention with the original five participants and find that each participant loses exactly 10 pounds in the first 3 weeks. Without recalculating the...
-
Which security has the highest beta measure? A. Security 1. B. Security 2. C. Security 3. Use the following data to answer question: An analyst gathers the following information: Security Expected...
-
\(\sqrt{19}\) Identify each number as a natural number, an integer, a rational number, or a real number.
-
Knight Company reports the following costs and expenses in May. Instructions From the information, determine the total amount of: (a) Manufacturing overhead. (b) Product costs. (c) Periodcosts....
-
Financial information for BDS enterprises for theyear-ended December 31, 20xx, was gathered from an accountingintern, who has asked for your guidance on how to prepare an incomestatement format tha...
-
A shell-and-tube exchanger with two tube passes is used to heat ethanol from 60F to 140F with steam condensing at 230F in the shell. The BWG 14 steel tubes are in. OD. The design overall coefficient...
-
25. Can all immunoglobulins be considered antibodies? A) Yes B) Only some C) No D) It is unclear 26. Which immunoglobulin plays a major role in conferring protectionagainst microbial pathogens? A)...
-
1. In order to produce a new product, a firm must lease equipment at a cost of $160,000 per year. The managers feel that they can sell 62,000 units per year at a price of $87. What is the highest...
-
Catherine Jones has determined the following information about her own financial situation. Her checking account is worth $850 and her savings account is worth $1,300. She owns her own home that has...
-
Assuming an interest rate of 2.125% p.a., but with monthly compounding, what is the future value at the end of year 37 of annual deposits of $2500 with the first deposit made at the end of year 5 and...
-
Your bank card has an APR of 21% and there is a 3% fee for cash advances. The bank starts charging interest on cash advances immediately. You get a cash advance of $500 on the first day of the month....
-
Assume you have been given $400,000 CAD with access to all listed stocks, bonds, futures, and options worldwide. You can trade in options and futures, in combination with the underlying asset....
-
Cameron, age 30, and Deirdre, age 29, are married and will file a joint return. They cannot be claimed as dependents by any other taxpayer. Cameron and Deirdre have no children or other dependents....
-
Is it a breach of fiduciary duty for a director of a real estate investment trust (REIT) negotiating a joint venture on behalf of the REIT with another director for the development of a portfolio of...
-
Exercise 4.3 asks you to add the Owned state to the simple MSI snooping protocol. Repeat the question, but with the simple directory protocol above.
-
We will now examine cost-performance issues in sorting. After all, it is easy to buy a high-performing machine; it is much harder to buy a costeffective one. One place where this issue arises is with...
-
Consider a multiple-issue design. Suppose you have two execution pipelines, each capable of beginning execution of one instruction per cycle, and enough fetch/decode bandwidth in the front end so...
-
Insurance is a waste of money. If and when you suffer a financial loss because of an accident or some other event, you can pay for it from your savings account. Do you agree or disagree with this...
-
How can developing an insurance program help you manage risk?
-
Why are property and liability insurance necessary to protect a homeowner from financial loss?
Study smarter with the SolutionInn App