Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

ASSIGNMENT

Program : B.E-CSE Max. Marks: 15


Course : Compiler Design Course code:SCSA1604
Sem : VI Batch : 2020-2024

Part-A(MCQ) Answer ALL the questions (5×1=5)


1. In Algebraic expression simplification, a = a + 1 can simply be replaced by?
a. INC a
b. DEC a
c. MUL a
d. a++
2. How many descriptors are used for track both the registers (for availability) and
addresses (location of values) while generating the code?
a. 2
b. 3
c. 4
d. 5
3. __________ are used to keep track of memory locations where the values of
identifiers are stored.
a. Register descriptor
b. Address descriptor
c. Both A and B
d. None of the above
4. Code generator uses ______ function to determine the status of available
registers and the location of name values.
a. setReg
b. cinReg
c. pfReg
d. getReg
5. Do the compiler can make use of memory hierarchy and CPU registers?
a. TRUE
b. FALSE

Part-B(Short Answers) Answer ALL the questions (5×1=5)


1. Define register allocation.
2. List down the issues involved in code generation.
3. Write the code sequence for the d:=(a-b)+(a-c)+(a-c)
4. Define simple code generator.
5. Define use of machine idioms.

Part-C(Long Answer) Answer ALL the questions (1×5=5)


1. Illustrate the procedure for converting assembly code to machine code with an
example

You might also like