GTU Computer Engineering (Semester 6)
System Programming
December 2014
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1 (a) Define following terms:
1. System Program 2. Language Processor 3. Parsing 4. Operator Grammar 5. Handle 6. Assembler 7. Indirect Triple
7 M
1 (b) What is grammar? Explain types of grammar. Write an unambiguous grammar for an arithmetic expression containing the operators ? (exponentiation), +,*.
7 M

2 (a) Explain left recursion and left factoring with suitable example.
7 M
2 (b) Given a grammar
S→XS|dS|ε
X→Y|Zb|aY
Y→cZ
Z→e
Develop an LL(1) parsing table and check whether the string "dace" is accepted or not?
7 M
2 (c) Write a regular expression for the language consisting of all strings ending with 1 and does not contain substring 00. Convert the resultant regular expression into Deterministic Finite Automata.
7 M

3 (a) Which are the different assembly language statements? Explain each of them with suitable example.
7 M
3 (b) Explain use of various data structures needed in pass-I of the assembler and give details of their fields.
7 M
3 (c) List out various assembler directives. Explain any three with example.
7 M
3 (d) Given the following source program and code for mnemonics
1. Show the content of the symbol table at the end of pass-I of a two pass Assembler.,br> 2. Show the intermediate code generated for program using variant-I of intermediate code representation. Assume that each instruction is one word.
Source Program Mnemonics code
  START 100 START 1
A DS 3 END 2
L1 MOVER AREG,B ORIGIN 3
  ADD AREG,C EQU 4
  MOVEM AREG,D STOP 0
D EQU A+1 ADD 1
L2 PRINT D MOVER 4
  ORIGIN A-1 MOVEM 5
C DC '5' PRINT 10
  ORIGIN L2+1 DC 1
  STOP   DS 2
B DC '25' Ordinal number for AREG is 1
  END L1
7 M

4 (a) Explain default value parameter for macro and nested macro call with example.
7 M
4 (b) Explain following facilities for expansion time loop with example.
1. REPT statement 2. IRP statement
7 M
4 (c) Describe tasks and data structures considered for the design of a macro Preprocessor.
7 M
4 (d) What are advanced macro programming facilities? Explain with example.
7 M

5 (a) What is program relocation? How relocation is performed by linker. Explain with example.
7 M
5 (b) Consider the statement a=b+c*10.where a, b, c are of type float. Show the translation of the given statement by different phases of compiler to produce assembly language statement.
7 M
5 (c) What is code optimization? Explain with example various optimizing transformations.
7 M
5 (d) Write a short note on absolute loader.
7 M



More question papers from System Programming
SPONSORED ADVERTISEMENTS