Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

B.

Tech
PCCS4203
Fourth Semester Examination – 2010
SYSTEM PROGRAMMING
Full Marks – 70
Time : 3 Hours

Answer Question No. 1 which is compulsory and any five from the rest. The figures in the right-hand
margin indicate marks

1. Answer the following questions:[2X10] Module Chapter


(a) What is the work of USING pseudo-op? I Machine
structure and
Machine
Language and
ALP
(b) Describe the structure of BT(Base Table) used in pass2 of II Assembler
Assembler.
(c) What is Dummy argument in macro? Explain with example II Macro
Language and
Macro
processor
(d) Differentiate between relocation and loading. II Loader

(e) Name the cardsgeneratedin a Direct linking loader II Loader

(f) What is Bootstrap Loader? Why it is used? II Loader

(g) Name the Analysis phases of a compiler III Compiler

(h) For the C statement III Compiler


C= a+ b;
Find the codes generated in code generation phases of a
compiler
(i) Define BNF III Formal system

(j) Define the Formal system mathematically III Formal system

2. (a) General Machine Structure. [5] I Machine


structure and
Machine
Language and
ALP
(b) Describe the overall design of pass1 of an Assembler with the II Assembler
description of the data structure used in it.[10]
3 (a) Describe Conditional macro expansion facilities with suitable II MacroLanguage
and Macro
example[5] processor
(b) 1. Write an Assembly Language program for executing the C II ALP
instruction.
d= a+ b-c;
Assume that address of a=100, b=200, c=300,d=400[5]
4 (a) Describe the design of a Relocating loader. What is the II Loader
advantage of a Relocating loader over Absolute loader?[10]
(b) Describe the various Loading schemes with suitable example II Loader
from each[10]
5. (a) Describe the databases used in pass1 of macro processing[5] II Macro
Language and
Macro
processor
(b) Short notes II Loader
Overlays[5]
6. (a) Describe the phases of a compiler with neat sketches with their III Compiler
functionality and suitable example from each.[10]

(B) What are the various codeoptimizationtechniques, explain III Compiler


with suitable examples.[5]
7. (a) Short note III Compiler
Storage classes [5]
B.Tech
PCCS4203
Fourth Semester Examination – 2011
SYSTEM PROGRAMMING
Full Marks – 70
Time : 3 Hours

Answer Question No. 1 which is compulsory and any five from the rest. The figures in the right-hand
margin indicate marks

1. Answer the following questions:[2X10] Module Chapter


(a) Which instruction will be executed after the “BE SAME” I Machine
structure and
instruction ? Justify your answer. ALP

CLI =F’3’,3
BE SAME
LR 3,5
SAME AR 5,5
(b) What is the difference between the following two instructions? I ALP(Assembly
language
programming)
INDEX EQU 5
INDEX DC F’5’.
(c) Difference between RR and RX instruction formats with suitable I ALP
examples
(d) Describe the function of each of the RLD, ESD, TXT and END II Loader
cards
(e) What is the difference in function between the EXTRN and II Loader
ENTRY pseudo-ops
(f) Differentiate between an Absolute loader and a Direct-linking II Loader
loader

(g) Describe the structure of MDT(Macro Definition Table) used in II Macro


Language and
pass1 of a macro processor with a suitable example Macro
processor
(h) What are four main functions of a Loader II Loader

(i) Define formal Grammar with a suitable example III Formal


Language and
Formal system
(j) For the C statement A= B *C+E*F Find the codes generated in III Compiler
code generation phases of a compiler
2. (a) Describe the overall design of a Two-pass macro processor II Macro
Language and
with the description of the data structure used in it. [10] Macro
processor
(b) Describe the various loading scheme with suitable example from II Loader
each. Which of these is the best loading scheme? Give your
justification for the same[10]
3 (a) What is a Conditional macro? Explain with a suitable example[5] II Macro
Language and
Macro
processor
(b) Explain the concept of overlays with a suitable example[5] II Loader

4 (a) For the following program [10] II Assembler and


ALP
(a)Show the symbol table at the end of pass1.
(b)Show the literal table at the end of pass1
(c)Show the changes in the base register table during pass2.
(d)Show the generated “machine” code from
pass2.[10][Assembler]

SIMPLE START
BEGIN BALR 15, 0
USING BEGIN+2, 15
LOOP L R1, =F’2’
A R1, =F’3’
ST R1, FIVE
CLI FIVE+3,4
BNE LOOP
BR 14
R1 EQU 1
FIVE DS F
END

(b) Short notes II Loader


(a)Compile-and-Go Loader [5]
(b)Bootstrap Loader
5. (a) Describe the different phases of a compiler with a neat diagram III Compiler
and explain their functionality with a suitable example[10]
(b) Differentiate between BNF and Canonic system with suitable III Formal system
and Formal
example[5] Language
6. (a) Explain different code optimization techniques with suitable III Compiler
example[5]
(b) Short note [5] III Programming
Language
(a)Block structure in PL/I 1/PL1
B.Tech
PCCS4203
Fourth Semester Examination – 2012
SYSTEM PROGRAMMING
Full Marks – 70
Time : 3 Hours

Answer Question No. 1 which is compulsory and any five from the rest. The figures in the right-hand
margin indicate marks

1. Answer the following questions:[2X10] Module Chapter


(a) What is Virtual memory? I Function of
operating
system
(b) What is System software? Name at least four system software I Introduction to
system s/w
those are frequently needed in computer science.
(c) Differentiate between compiler and interpreter. I Introduction to
system s/w
(d) Explain about the Function of a Memory register. I Function of
operating
system
(e) Differentiate between a process and program I Function of
operating
system
(f) Name at least four important functions of an operating system I Function of
operating
system
(g) What is macro instruction? II Macro
Language and
Macro
processor
(h) Explain the concept.of a formal system. III Formal
Language and
Formal system
(i) Define a Context Free Grammar. III Formal
Language and
Formal system
(j) What is macro processor? III Formal
Language and
Formal system
2. (a) Explain the difference between application software and system I Introduction to
system s/w
software. [5] and
Application
s/w
(b) What are assembler directives? Explain the purpose of the I Introduction to
ALP
following pseudo
(i)USE [5] [Machine structure and assembly programming]
(ii)BASE
(iii)EXTRER
(IV)ORG
(V)LTORG

3 (a) Explain dynamic linking and loading.[5] II Loader

(b) Bootstrap Loader[5] II Loader

4 (a) Explain what do you mean by functional modularity of III Programming


language
programming Language.[5]
(b) Explain in brief advantages of using high level languages over III Programming
language
that of Assembly Language[5]
5. (a) Consider the following fragment of ‘C’ code:[5] III Compiler
int a ,b ,c;
a=b + c;
Write the output at all phases of the compiler for the
above ‘C’ code.
(b) Give the classification of Grammar with example in each[5] III Formal system
and Formal
Language
6. Give the entries in symbol table, Literal table and base table at the II Assembler
end of pass1 and pass2 of the assembler .Also give the code at the
end of each pass.[10]

PROG 1 START 0
BALR 15,0
USING *, 15
LR 5, 15
LH 1 ,DAT1
USING * ,10
BR 14
DAT 2 DC F’11’
DAT 1 DC H’22’
TRS DC H’22’
BCK DS F
AA EQU 2
DD EQU 2
BALR 2 ,0
USING *+AA, TRS
LA 7 ,=A(BCK)
BR 6
DC H’64’
DROP D
L 9, A(DAT1)
A 9, =A(DAT1)
LTROG
ST 9, =F ‘400’
END Q

5 I Machine
structure and
Machine
Language
Write a Machine language program to add the contents of 20
adjacent full words in memory to the number 50 under following
set of assumptions[10]
(i)The program is in core at absolute location 48.
(ii)The 20 adjacent full words are starting at absolute location
900
(iii)The number 50 to be added is at absolute location 896.
(IV)The number 20 is at absolute location 892.
(v)Register No.1 contains 900.

7 (a) BNF grammar [5] III Formal


Language and
Formal System
(b) Discuss the design of Two-pass assembler[5] II Assembler

You might also like