0% found this document useful (0 votes)
89 views2 pages

Gujarat Technological University

This document contains a exam for the subject of System Programming. It includes 5 questions covering topics like system programs, grammars, parsing, assembly language, macro processing, linking and loading. Each question has multiple parts asking students to define terms, explain concepts, develop parsing tables, show symbol tables, intermediate code etc. It tests students' understanding of the various phases and components involved in the compilation and execution of a computer program.

Uploaded by

Lovely Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views2 pages

Gujarat Technological University

This document contains a exam for the subject of System Programming. It includes 5 questions covering topics like system programs, grammars, parsing, assembly language, macro processing, linking and loading. Each question has multiple parts asking students to define terms, explain concepts, develop parsing tables, show symbol tables, intermediate code etc. It tests students' understanding of the various phases and components involved in the compilation and execution of a computer program.

Uploaded by

Lovely Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Seat No.: ________ Enrolment No.

___________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER–VI • EXAMINATION – WINTER • 2014
Subject Code: 160706 Date: 08-12-2014
Subject Name: System Programming
Time: 02:30 pm - 05:00 pm Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

Q.1 (a) Define following terms: 07


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

Q.2 (a) Explain left recursion and left factoring with suitable example. 07
(b) Given a grammar 07
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?
OR
(b) Write a regular expression for the language consisting of all strings ending with 1 07
and does not contain substring 00. Convert the resultant regular expression into
Deterministic Finite Automata.

Q.3 (a) Which are the different assembly language statements? Explain each of them with 07
suitable example.
(b) Explain use of various data structures needed in pass-I of the assembler and give 07
details of their fields.
OR
Q.3 (a) List out various assembler directives. Explain any three with example. 07
(b) Given the following source program and code for mnemonics 07
1. Show the content of the symbol table at the end of pass-I of a two pass
assembler.
2. Show the intermediate code generated for program using variant-I of
intermediate code representation.
Assume that each instruction is one word.

1
Source Program Mnemonics code
START 100 START 01
A DS 3 END 02
L1 MOVER AREG,B ORIGIN 03
ADD AREG,C EQU 04
MOVEM AREG,D STOP 00
D EQU A+1 ADD 01
L2 PRINT D MOVER 04
ORIGIN A-1 MOVEM 05
C DC ‘5’ PRINT 10
ORIGIN L2+1 DC 01
STOP DS 02
B DC ‘25’ Ordinal number for AREG is 1
END L1
Q.4 (a) Explain default value parameter for macro and nested macro call with example. 07
(b) Explain following facilities for expansion time loop with example. 07
1. REPT statement 2. IRP statement
OR
Q.4 (a) Describe tasks and data structures considered for the design of a macro 07
preprocessor.
(b) What are advanced macro programming facilities? Explain with example. 07
Q.5 (a) What is program relocation? How relocation is performed by linker. Explain with 07
example.
(b) Consider the statement a=b+c*10.where a, b, c are of type float. Show the 07
translation of the given statement by different phases of compiler to produce
assembly language statement.
OR
Q.5 (a) What is code optimization? Explain with example various optimizing 07
transformations.
(b) Write a short note on absolute loader. 07

*************

You might also like