Here is the entire assembly code for the body of a function (but function) in a C program. ADD R7, R4, H5 LDR R7, R7, He STR R7, R5, ue LDR R7, R5, ue STR R7, RS, -1 ADD R7, R4, 14 LDR R7, R7, ue STR R7, RS, He
Here is the entire assembly code for the body of a function (but function) in a C program. ADD R7, R4, H5 LDR R7, R7, He STR R7, R5, ue LDR R7, R5, ue STR R7, RS, -1 ADD R7, R4, 14 LDR R7, R7, ue STR R7, RS, He
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.6: A Case Study: Acid Rain
Problem 9E
Related questions
Question
100%
![Local Variables and Parameters
Here is the entire assembly code for the body of a function (but excluding the activation record set-up code and the return statement of the
function) in a C program.
ADD R7, R4, 5
LDR R7, R7, He
STR R7, R5, ue
LDR R7, R5, He
STR R7, R5, H-1
ADD R7, R4, 14
LDR R7, R7, ne
STR R7, R5, ne
And here is the entire global data section of that program
GLOBAL_DATA_START
g .FILL 12
L1_activi .FILL 1c3_L1_activi
f .FILL 1c3_t
L5_activi .FILL lc3_L5_activi
L7_activi .FILL 13
L6_activi .FILL H6
L4_activi .FILL 184
L3_activi .FILL 1
L2_activi .FILL 45
.END
How many lines of C code does the body of this function have?
How many local variables does this function have?
What is the value in the first local variable just before the function returns?
If the function has two parameters, how many memory cells does the activation record for this function occupy?](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb3d47f7f-94c0-4308-8629-642f85ae9669%2F7f494643-b50c-49d4-b905-581a09f507aa%2Frj5x9r_processed.png&w=3840&q=75)
Transcribed Image Text:Local Variables and Parameters
Here is the entire assembly code for the body of a function (but excluding the activation record set-up code and the return statement of the
function) in a C program.
ADD R7, R4, 5
LDR R7, R7, He
STR R7, R5, ue
LDR R7, R5, He
STR R7, R5, H-1
ADD R7, R4, 14
LDR R7, R7, ne
STR R7, R5, ne
And here is the entire global data section of that program
GLOBAL_DATA_START
g .FILL 12
L1_activi .FILL 1c3_L1_activi
f .FILL 1c3_t
L5_activi .FILL lc3_L5_activi
L7_activi .FILL 13
L6_activi .FILL H6
L4_activi .FILL 184
L3_activi .FILL 1
L2_activi .FILL 45
.END
How many lines of C code does the body of this function have?
How many local variables does this function have?
What is the value in the first local variable just before the function returns?
If the function has two parameters, how many memory cells does the activation record for this function occupy?
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![Principles of Information Systems (MindTap Course…](https://www.bartleby.com/isbn_cover_images/9781285867168/9781285867168_smallCoverImage.gif)
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![Principles of Information Systems (MindTap Course…](https://www.bartleby.com/isbn_cover_images/9781285867168/9781285867168_smallCoverImage.gif)
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
![Systems Architecture](https://www.bartleby.com/isbn_cover_images/9781305080195/9781305080195_smallCoverImage.gif)
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning