sp set 2



Q1.Multiple Choice Questions                                                                                 
1) Execution gap is the gap between
a) AD & ED                      b)PLD & ED               c)AD & PLD              d)None of the above
2) All errors are reported against the erroneous statement itself, if error reports are produced in

Pa) pass-I                          b)Pass-II                      c)A &b                        d)None of the above
3) Which of the following is/are assembler directives?
      a) STOP              b)READ                      c)EQU             d)a & c                        e)a & b
4) __________ are generated as output of scanning.
      a) Parse Trees      b) Tokens        c)Sequence of actions             d)Intermediate representation.
5) A/An __________statement indicates an action to be performed during the execution of the    assembled program
      a) Declarative                  b)Imperative                c)Assembler directives            d)All of above
6) Compiler bridges a semantic gap between which domains?
      a) Application  & Execution       b)Application & PL    c)PL & execution        d)None of these
7) Which of the following is a 8- bit data register in Intel 8088 processor?
      a) Ax                               b)BL                            c)DS                                        d)SH
8) In absolute loader function of linking is done by
    a) Linker                  b) Loader                    c) Programmer d) Assembler
9) In direct linking loader which is not related with object program?
     a) ESD                   b) RLD                        c) BSS                         d) TXT
10) Binary symbolic subroutine loader is example of
     a) Absolute loader  b) Relocating Loaders    c) Compile & Go loaders     d) Direct linking loader
11). Binding of external reference to the link time address is called
a) Translation        b) Loading                  c) Linking                    d) None of these
12) A model statement is a statement from which a/an ________language statement may be generated during macro expansion.
   a) Machine               b) Assembly                c) Target                      d) None
13) Which language processor bridges the execution gap but is not a language translator?
   a) Preprocessor         b) Migrator                  c) Interpreter               d) None
14) A macro prototype statement consists of
    a) Actual parameters        b) Formal Parameters     c) Model statements   d) None of these
15) If load origin & linked origin are different then relocation is performed by _______
   a) Linker                   b) Loader                    c) Translator                d) Both a&b
16) In loaders, location & length of each address constant is maintained by
   a) ESD                     b) TXT                        c) RLD                        d) END
17) In loaders track of each segment assigned address is maintained by
     a) PLA                   b) Initial PLA              c) External Symbol Table        d) None of these
 18) Address assigned by the loader to symbols is called
     a) Load origin        b) Load time address  c) Linked origin          d) Link time address
19) Relocation table is generated in
     a) Loader                b) Binary program       c) Object module        d) Translator
20)  Which one of the following is a operator grammar?
      a) A :: =CD+ E | a b) A :: =CaD | C + D  c)A :: =C+D | C*D | a d)None of above

2          Attempt any four:                                                                                       (5x4=20 Marks)
            a) Explain different types of grammars with their characteristics & limitations.
            b) Explain how lexical & syntactic features of programming language are specified by                                    grammar.
            c) List & explain advanced assembler directives with example.
            d) Explain different intermediate code forms. Compare them based on memory                 requirements.
            e) Discuss different kinds of parameters in macros.

3          Attempt any one:                                                                                                     10Marks
a) How LEX works? Give illustrations.
b) Discuss the problems of single pass assembly for Intel 8088 processor. How are they fixed?

4          Define macro & macro expansion. What is lexical & semantic expansion?            10Marks

5          Attempt any four:                                                                                       (5x4=20 Marks)
            a) Discuss major issues in code generation for expressions.
b) Explain data flow analysis in global optimization.
c) Define linking & explain object modules and binary programs used in linking.
            d) Write an algorithm for program linking with example.
            e) List the data structures used in the design of direct linking loader.

6          Attempt any one:                                                                                                     10Marks
a) Explain local optimization using value numbers. Give limitations of local optimization.
b) Discuss linking for overlays in detail.

7          Discuss PL features those contribute to the semantic gap between PL domain and                         execution domain which is bridged by compiler.                                                          10Marks

Comments