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
icon
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?
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
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
ADT and Class
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning