Question: 9 . - [ Stack mechanism and code generation ] ( 1 1 points ) . Consider the program described below and give the generated
Stack mechanism and code generation points Consider the program described below
and give the generated code for the statements at and Procedures are called as shown
below.
BIGSUB calls SUB
SUB calls SUB
SUB calls SUB
Assume the ARs have SL DL and RA If errors occur, indicate where it is detected and what is
the cause of the error.
procedure BIGSUB;
var A B C : integer;
procedure SUB;
var A K : integer;
begin SUB
B : C A;
end; SUB
procedure SUBX : integer;
var B F E : integer;
procedure SUB;
var C K E : integer;
begin SUB
SUB;
K : B E;
end; SUB
begin SUB
SUB;
K : E A;
end; SUB
begin BIGSUB
SUB;
end; BIGSUB
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
