0% found this document useful (0 votes)
29 views

System Programming - Question Bank Unit I and II (2024)

Vb co in ch kkbnnnnnnn

Uploaded by

revikam356
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

System Programming - Question Bank Unit I and II (2024)

Vb co in ch kkbnnnnnnn

Uploaded by

revikam356
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Department of Computer Engineering

Semester: 5 Sub: System Programming and OS )

Question Bank

Language Processors

1. Explain following.
(i) Execution Gap (iii) Phases of Compiler
(ii) Interpreter (iv) Language Migrator
2. List various phases of a language processor. Explain roles of first two phases of it.
Also explain symbol table.
3. Fill in the Blanks
(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

Page 1 of 5
Assemblers

1. Explain assembly scheme with suitable example


2. Let us consider a two pass assembler and assume that each instruction is one word.
Given an assembly program and code for Mnemonics.

(i) Show content of symbol table at the end of pass-one of an assembler.


(ii) Write intermediate code representation of the assembly program. Use variant-II of
intermediate code representation
3. Explain the role of Mnemonic Opcode Table, Symbol Table, Literal Table and POOL
Table in assembling process of assembly language program.
4. Compare single pass assembler and two pass assembler. Explain two pass assembler
in detail with suitable example.
5. Explain analysis and synthesis phases of an assembler by clearly stating their tasks.
6. Explain and show usage by giving examples of following assembler directives:
ORIGIN, EQU, LTORG, START.
7. Explain & compare various intermediate code forms (representations) for an assembler.
8. Explain two pass assembler.
9. Explain the data structure of single pass assembler.
10. Write difference between one pass and two pass assembler.
11. What are advanced assembler directives. Explain any two with suitable example.
12. Consider following assembly program. Show (i) Contents of Symbol Table (ii)
Page 2 of 5
intermediate codes using Variant I representation (iii) corresponding machine codes
START 100
READ A
READ B
READ C
MOVER AREG, A
ADD AREG, B
ADD AREG, C
MULT AREG, C
MOVEM AREG, RESULT
PRINT RESULT
STOP
A DS 1
B DS 1
C DS 1
RESULT DS 1
END
Instruction opcodes:
READ – 09, MOVER – 04, MOVEM – 05, ADD – 01, MULT – 03, PRINT – 10, STOP – 00
Assembler-directive codes: START – 01, END - 02
Register code: AREG – 01

Page 3 of 5
Macro Processors

1. (i) Write a macro that moves n numbers from the first operand to the second operand,
where n is specified as third operand of the macro.
(ii) Write a macro which takes B, C, and D as parameters and calculates B*C + C*D.
2. Compare the features of subroutine and macros with respect to following.
(i) Execution speed
(ii) Processing requirement by assembler.
(iii) Flexibility and generality
3. Explain advanced macro facilities with suitable example.
4. Explain design specification tasks for macro preprocessor with suitable example.
5. Explain following terms with suitable example.
(i) Expansion time variable (iii) Semantic Expansion
(ii) Positional parameter (iv) Macro Preprocessor
6. Do as directed
(i) A macro is a unit of specification for _________through expansion. (Fill in the blank)
(ii) Macro definition is enclosed between a __________statement and a_____________
statement. (Fill in the blank)
(iii) A _______________________________ is designed to hold the names of all macro
defined in a program. (Fill in the blank)
(iv) An ___________________________ counter is maintained to count the number of
nested macro calls. (Fill in the blank)
(v) A lexical expansion is typically employed to replace occurrence of formal parameters
by corresponding actual parameters. (State True/False)
(vi) Default specification of parameters is useful in situations where a parameter has the
different value in most calls. (State True/False)
Page 4 of 5
(vii) Macro definition table is maintained to hold value of sequencing symbols. (State
True/False)
7. Explain with examples - expansion time variables, expansion time statements - AIF
and AGO for macro programming. Show their usage for expansion time loop by giving
example.
8. Describe tasks and data structures considered for the design of a macro preprocessor.
9. Define two macros of your choice to illustrate nested calls to these macros. Also show their
corresponding expansion.
10. Explain attributes of formal parameters, default specifications of parameter and semantic
expansion for macro by giving examples.
11. What is macro in programming language. Write an algorithm to process macro definitions.
12. Draw a flow chart and explain simple one pass macro processor.
13. Explain macro expansion in details.
14. (i) Define a macro taking A and B as parameters to compute A = A * B + B * B + A + B
(ii) Explain positional parameters, keyword parameters and default value parameters for
macros.
15. (i) Define a macro taking starting_location and N as parameters to find summation of all
N numbers stored at locations starting from starting_location. The result is to be stored
at starting_location.
(ii) Illustrate expansion of nested macro calls by giving example.
16. What is Macro-Preprocessor? Explain steps of macro-preprocessor design.

Page 5 of 5

You might also like