written 7.9 years ago by |
System Software - Dec 2013
Computer Science Engg. (Semester 5)
TOTAL MARKS: 100
TOTAL TIME: 3 HOURS
(1) Question 1 is compulsory.
(2) Attempt any four from the remaining questions.
(3) Assume data wherever required.
(4) Figures to the right indicate full marks.
1 (a) Bring out the differences between system software and application software.(4 marks)
1 (b) Write programs in both SIC and SIC/XE to copy a character string 'System Software' to another string.(6 marks)
1 (c) Explain the following with reference to SIC/XE machine architecture:
(i) Instruction formats
(ii) Addressing mode
(iii) Data formats
(iv) Register organization(10 marks)
2 (a) Explain the different data structures used in two pass assembler. Mention clearly their functins in Pass 1 and Pass 2.(6 marks)
2 (b) What is the need of pass 2 assembler? Reason out with a simple example.(4 marks)
2 (c) Generate the object code and complete object program for the following SIC/XE program.
SUM | START | 0 | OPCODES | |
FIRST | LDX | #0 | LDX | -04 |
LDA | #0 | LDA | -00 | |
+LDB | #TABLE2 | LDB | -68 | |
BSE | TABLE2 | ADD | -18 | |
LOOP | ADD | TABLE, X | TIX | -2C |
ADD | TABLE2, X | JLT | -38 | |
TIX | COUNT | STA | -OC | |
JLT | LOOP | RSUB | -4C | |
+STA | TOTAL | |||
RSUB | ||||
COUNT | RESW | 1 | ||
TABLE | RESW | 2000 | ||
TABLE | RESW | 2000 | ||
TOTAL | RESW | 1 | ||
END | FIRST |
1. | NUMB | EQU | MAXLEN/2 |
2. | MAXLEN | EQU | BEND-BUF |
3. | PREVB | EQU | BUF-1 |
4. | BUF | RESB | 4096 |
5. | BEND | EQU | * |
Assume the value for location counter as 1034 (H) at line number 4.(8 marks) 4 (a) Explain with an algorithm the working of an absolute loader.(6 marks) 4 (b) Distinguish between linking loader and linking editor.(4 marks) 4 (c) What are the major data structures required for linkage loader? Write and explain the algorithm for pass 1 of linking loader.(10 marks) 5 (a) What is an interactive editor? List the four tasks performed by document linking process in an interactive system.(4 marks) 5 (b) Explain briefly structure of a typical editor with the help of a block daigram.(10 marks) 5 (c) Discuss briefly the following debugging functions:
(i) Break points
(ii) Tracing
(iii) Trace back(6 marks) 6 (a) Explain with an example the various data structure required for the design of a macro processor.(8 marks) 6 (b)
SUM | MACRO | &ID |
LDA | X&ID?1 | |
ADD | X&ID?2 | |
STA | X&ID?5 | |
MEND |
Expand the following macro invocation statement using the above given macro:
(i) SUM BEETA (ii) SUM A(4 marks) 6 (c) Explain the advantages and disadvantages of general purpose macro processors.(8 marks) 7 (a) Explain with an example the structure of lex program(8 marks) 7 (b) Define regular expression. Give regular expression for the following
(i) ยท (ii) * (iii) ^ (iv) $ (v) {} (vi) ?(4 marks) 7 (c) Write a lex program to count the vowels and consonants in given string.(8 marks) 8 (a) What is shift/reduce parsing? Explain the parsing for the string "feed=12+13" using the following grammer.
Statement ? NAME= expression
Expression ? NUMBER + NUMBER / NUMBER-NUMBER(10 marks) 8 (b) Write a YACC program to recognize the validity of an arithmetic expression that uses +, -, * and /.(10 marks)