Mid-term Examination, October, 2001 CS 502 System Software Marks : 50 Time : 2 hrs Write brief answers 1. How will you classify a software as either an application software or a system software ? Give reasons to state that a text editor such as vi is a system software as well as an aplication software. 3 + 3 2. Why was assembly language invented ? 4 [Hint : What was the situation before and how was it improved by assembly languages ?] 3. Draw a block diagram to show the steps involved in a two-pass assembler, indicating where the important data structures are built and used. What are the various fields and their types in the different data structures ? 8 + 5 [Hint: First draw a rough sketch in half of the last page of your answer book] 4. What is lexical analysis ? What is a convenient method of creating an efficient lexical analyser (mention what you will have to do to create it)? 3 + 4 5. Why is the macro feature provided in an assembly language ? How does it affect the size and efficiency of the machine language program generated ? 3 + 3 6. What are positional parameters, keyword parameters and expansion time variables in macros ? Give a smple example to show their usage. 6 + 2 7. What are some of the errors that an assembler should detect ? What course of action should the assembler take when it detects an error ? 3 + 3