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

Gujarat Technological University

This document contains instructions and questions for a Systems Programming exam. It includes the following: 1. Part 1 contains 4 fill-in-the-blank questions and a question to define 3 terms related to assemblers, macros, and parsing. 2. Part 1b asks to write a grammar for arithmetic expressions using BNF notation. 3. Part 2 contains questions on DFAs, regular expressions, and parsing strings using an LL(1) table. 4. Part 3 asks about recursive descent parsing with examples, comparing top-down and bottom-up parsing, and topics related to loaders and self-relocating programs. 5. Part 4 covers differences between one-pass

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)
38 views2 pages

Gujarat Technological University

This document contains instructions and questions for a Systems Programming exam. It includes the following: 1. Part 1 contains 4 fill-in-the-blank questions and a question to define 3 terms related to assemblers, macros, and parsing. 2. Part 1b asks to write a grammar for arithmetic expressions using BNF notation. 3. Part 2 contains questions on DFAs, regular expressions, and parsing strings using an LL(1) table. 4. Part 3 asks about recursive descent parsing with examples, comparing top-down and bottom-up parsing, and topics related to loaders and self-relocating programs. 5. Part 4 covers differences between one-pass

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 – SUMMER 2013
Subject Code: 160706 Date: 04-06-2013
Subject Name: System Programming
Time: 10.30 am - 01.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) Fill in the Blanks 04


(i) A _____________________bridges an execution gap to the machine
language of a computer system.
(1) Detranslator, (2) Preprocessor, (3) Language translator
(ii) A _____________________bridges the specification gap between two
programming languages.
(1) Interpreter (2) Language Migrator (3) Compiler
(iii) _____________________ is designed to hold the value of formal
parameters during expansion of macro call.
(1) Actual Parameter Table (2) Macro Name Table (3) Expansion time
variable table
(iv) Syntax analysis processes the string of tokens built by
_______________ to determine the statement class.
(1) Semantic Analysis (2) Lexical Analysis (3) Itself

Define following terms: 03


(i) Assembler (ii) Macro (iii) Parsing
(b) Write complete grammar for an arithmetic expression containing operators 07
‘+’, ‘–‘, ‘*’, ‘$’ using recursive specification and Backus Naur Form (BNF)
where ‘$’ is exponentiation operator.
Q.2 (a) (i) Build a DFA for following regular expression. 05
(a | b)*aab#
(ii) A language consists of all strings of a’s and b’s which ends with b and 02
does not contain aa. Write regular expression for the language.
(b) Parse following strings using given LL(1) parsing table (TABLE-I) 07
(i) id*id + id * id (ii) id + id + id + id
TABLE-I
Non- Source symbol
terminal <id> + * $
E EàTE’
E’ E’à+TE’ E’à ε
T Tà VT’
T’ T’àε T’à*VT’ T’à ε
V Và<id>
OR
(b) Explain relocation and linking requirements in segmented addressing with 07
suitable example.
Q.3 (a) Explain recursive decent parser with suitable example. Also state its 07
drawbacks.
(b) (i) Compare top-down and bottom-up parser. 03
(ii) Explain following terms: (1) Loaders (2) Self Relocating Programs 04
1
OR
Q.3 (a) Write operator precedence table for arithmetic operators “+”, “*”, “-”, “/” . 07
Parse following expression using the table. id * id + id * id
(b) Briefly explain the tasks performed by analysis and synthesis phases of simple 07
assembly schemes.

Q.4 (a) (i) Write difference between one pass and two pass assembler. 03
(ii) Explain Symbol table and Mnemonics table with suitable example. 04
(b) Given an assembly language program for finding factorial of a given 07
number N with Mnemonic code details. Write an equivalent machine
language program.
START 101 Mnemonics CODE
READ N STOP 00
MOVER BREG, ONE ADD 01
MOVEM BREG, TERM MULT 03
AGAIN MULT BREG, TERM MOVER 04
MOVER CREG, TERM MOVEM 05
ADD CREG, ONE COMP 06
MOVEM CREG, TERM BC 07
COMP CREG, N READ 09
BC LE, AGAIN PRINT 10
MOVEM BREG, RESULT LE 02
PRINT RESULT START 01
STOP END 02
N DS 1
RESULT DS 1 Ordinal number of BREG
ONE DC ‘1’ and CREG is 2 & 3
TERM DS 1 respectively
END
OR
Q.4 (a) What are advanced assembler directives. Explain any two with suitable 07
example.
Q.4 (b) Explain macro expansion in details. 07

Q.5 (a) What is macro-preprocessor? Explain steps of macro-preprocessor design. 07


(b) What are the issues in code generation in relation to compilation of 07
expression? Explain each issue in brief.
OR
Q.5 (a) Explain following advanced macro facilities: 07
(i) Alteration of flow of control during expansion
(ii) Expansion time variables
(b) What is meant by optimizing transformations? Explain any three with suitable 07
example.

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy