sp set 3



Q1.Multiple Choice Questions                                                                                 
1) Intermediate code for “ORIGIN” is
    a) (IS, 03)                b) (DL, 02)                  c)(AD, 03)                   d) (AD, 04)
2) Storage mapping is done by
   a) OS                        b) Compiler                 c) Linker                      d) Loader
3) A basic block can be analysed by
     a) a DAG               b) flow graph    c) a graph which may involve cycles            d) None of these        
4) Resolution of externally defined symbols is performed by  
    a) Linker                  b) Loader                    c) Compiler                 d) Assembler
5) In absolute loading scheme which loader function is accomplished by assembler?
   a) Relocation            b) Allocation               c) Linking                    d) Loading
6) The back end performs
a) Lexical analysis & syntax analysis                       b) Syntax & semantic analysis                                     c) Lexical, syntax & semantic analysis              d) None of above
7) __________ are generated as output of semantic analysis.
  a) Parse Trees            b) Tokens        c)Sequence of actions             d)Intermediate representation
 8) Specification gap is the gap between
a) AD & ED          b)PLD & ED               c)AD & PLD              d)None of the above
9) Which of the following is not assembler directive?
     a) END                   b) PRINT                    c)ORIGIN                  d) None of the above
10) To implement memory allocation, a data structure called ________ is used in analysis phase of assemble language.
    a) Instruction counter          b) Location Counter    c) DS               d) DC
11)__________ translation of an assembly language program can handle forward references easily.
   a) 1-Pass                   b) 2-Pass                      c) 3- Pass                     d) both a&b
12) Language processor bridges the ____________ gap
   a) Semantic              b) Execution                c) Specification           d) Application
13) The statement used to perform auxiliary function is
     a) Model statement  b) Conditional statement  c)Preprocessor statement  d) prototype statement
14) Relocation bits used by relocating loader are specified by 
     a) relocating loader itself               b)Linker          c) Assembler   d) macro processor
15) Which part of system software must reside in main memory under all circumstances?
    a) text editor           b) assembler                c) linker                       d) loader
16) General macro processor is an inbuilt function of  
   a) loader                   b) linker                       c) editor                       d) assembler
17) Which of the following is the phase of compilation process?
   a) Lexical analysis    b) Code generation     c) Both a & b              d) none of these
18) In absolute loading scheme which loader function is accomplished by programmer?
   a) Relocation            b) Allocation               c) Linking                    d) both b & c
 19) The linker
     a) is same as loader                                    b) is required to create a load module            
     c)uses source code as input                        d)is always used before programs are executed.
20) Which one is a type-3 grammar?
     a) A :: = π               b) α :: = β                     c) A :: = Bt/t                d) αAβ :: = α π β

2          Attempt any four:                                                                                       (5x4=20 Marks)
            a) Explain scanning and parsing in detail.
            b) Discuss forward reference, language processor pass & IR. What are desirable                 properties of IR?
            c) Explain different types of assembly language statements.
            d) Explain assembler directives of Intel 8088 architecture.
            e) What is lexical and semantic expansion? Explain with example how macro and subroutine differ?

3          Attempt any one:                                                                                                    10 Marks
            a) Explain front end and back end of toy compiler.
b) Discuss Pass-I of Two Pass Assembler. Write an assembly language program & display the contents of different data structures after Pass-I.
4          Explain the design of single pass assembler of Intel 8088 with details of different tables    generated.                                                                                                                10 Marks
5          Attempt any four:                                                                                       (5x4=20 Marks)
a) What is code optimization? How it is achieved? Explain optimizing compiler & give different optimizing transformation used in code optimization.
b) Explain operand descriptor and register descriptor  used in compilation of expressions.
            c) Explain with example: Linking concept.
            d) Discuss about self relocating programs.
            e) Explain dynamic loading in detail.
6          Attempt any one:                                                                                                    10 Marks
            a) Explain local optimization using value numbers. Give limitations of local            optimization.
b) Explain compilation of expressions in detail.

7       List different loading schemes and explain any two.                                                 10 Marks

Comments