You are on page 1of 14

St.

JOSEPH’S COLLEGE OF ENGINEERING, Chennai-119


DEPARTMENT OF INFORMATION TECHNOLOGY
CS1203 SYSTEM SOFTWARE

Classes: IT A, B & C
Semester: V
UNIT-1
Part A
1. Define System Software.
System software is the program that support the operation of a computer
E.g. Assembler, Compiler, etc.
2. Distinguish between System Software & application software.
Application software System software
Application program is primarily System programs are intended to
concerned with the solution of some support the operation and use of the
problem using computer computer rather than any particular
application
Not related to machine architecture Related to the architecture of the
machine on which they are to run
Not machine dependent Most system software’s are machine
dependent
3. Define hypothetical computer model.
SIC – Simplified Instructional Computer – is the hypothetical computer
that has been designed to include the hardware features most found on real
machines
4. What are the SIC two versions?
1) SIC-standard version.
2) SIC/XE (XE – Extra equipment or extra expensive.
5. Give the instructions format of SIC.
All machine instructions on the standard version of SIC have the
following 24-bit format:
Opcode x Address
The flag bit x is used to indicate indexed-addressing mode
6. Give the instructions set of SIC.
Load and store instructions (LDA, LDX, STA, STX)
Integer arithmetic operations (ADD, SUB, MUL, DIV)
Comparison operation (COMP)
Conditional Jump operations (JLT, JEQ, JGT)
Jump to Subroutine instruction (JSUB)
Return to Subroutine (RSUB)
7. Most system software is machine dependent. Justify.
System programs are to support the operation and use of the target
computer. The Machine code, Instruction formats, Addressing mode and
Registers are different for different machines. Therefore, most of the system
softwares are machine dependant.
8. What are the addressing modes in SIC?
There are two types of addressing available in SIC:
MODE INDICATION Target Address (TA) calculation
a) Direct addressing x=0 TA=address
b) Indexed addressing x=1 TA=address+(x)
9. What are the registers used in SIC?
There are 5 registers in SIC machine
Each register is 24 bits in length
Mnemonic Number Special use
or register-
name
A 0 Accumulator - used for arithmetic operations
X 1 Index register – used for addressing
L 2 Linkage register – JSUB (Jump to subroutine)
instruction stores the return address in this register
PC 8 Program Counter – contains the address of the next
instruction to be fetched for execution
SW 9 Status word – contains a variety of information,
including a Condition Code (CC)
10. Illustrate how input and out operations are performed in SIC.
- Performed by transferring one byte at a time to or from the rightmost 8-
bits of register A
- three I/O (input/output) instructions – each of which specifies the device
code as an operand
a. TD (Test Device) instruction tests whether the addressed device
is ready to send or receive a byte of data.
b. RD (Read Data)
c. WD (Write Data)
11. Give the Instructions format of SIC/XE.
There are four different instruction formats:
1.Format 1:
8
OPCODE

2.Format 2:
8 4 4
OP R1 R2

3.Format 3:
6 1 1 1 1 1 1 12

N i x b p e Disp
OP

4.Format 4:
6 1 1 1 1 1 1 20

n i x b p e Disp
OP

n-indirect
i-immediate
x-indexed
b-base
p-pc
e-extended
12. Give the Instructions set of SIC/XE.
 new registers: LDB, STB, etc.
 floating-point arithmetic: ADDF, SUBF, MULF, DIVF
 register move: RMO
 register-register arithmetic: ADDR, SUBR, MULR, DIVR
 supervisor call: SVC
• generates an interrupt for OS

13. Give the Data format of SIC/XE.


Floating-point data type: frac*2(exp-1024)

frac: 0~1
exp: 0~2047

s exponent (11) fraction (36)

14. What are the addressing modes in SIC/XE?


MODE INDICATION TA CALCULATION
a) Base relative b=1,p=0 TA=(B)+disp
Displacement value can range from 0 to 4095 (Only +ve values)

b) Program-counter relative b=0,p=1 TA=(PC)+disp


Displacement can vary from -2048 to 2047
15. Illustrate how input and out operations are performed in SIC/XE.
SIO, TIO, HIO: start, test, halt the operation of I/O device.

16. What are the registers used in SIC/XE?


Register:
Mnemonic Number Special use
B 3 Base register for addressing
S 4 General working register
T 5 General working register
F 6 Floating point accumulator
17. What are the four assembler directives used in the SIC assembler language?
WORD BYTE RESW RESB
18. Give any two differences between base relative
addressing and program counter relative addressing used
in SIC/XE.

19. What is the difference between the instructions LDA # 3


and LDA THREE?
In the first instruction immediate addressing is used. Here
the value 3 is directly loaded into the accumulator register where
as in the second instruction the direct addressing is used. Here
value assigned for the symbol THREE is loaded into the
accumulator register.

20. Consider the instructions in SIC/ XE programming


10 1000 LENGTH RESW 4
20 ----- NEW WORD 3
What is the value assign to the symbol NEW
In the line 10 the address is 1000 and the instruction is
RESW 4.It reserves 4 word (3x 4 =12) area for the symbol
LENGTH. Hence 12 is added to the LOCCTR. Thus the value of the
symbol NEW is 1000+12 =100C.

PART-B
1. Explain about the Cray T3E architecture
2. Write in detail about Pentium Pro architecture.
3. Explain the architecture of SIC/XE machine.
4. Explain the architecture of SIC machine.
5. Explain the General structure of IBM 370 system with a neat sketch and also explain
the different instruction formats used in it. Give one example for each instruction
format.
6. Mention the differences between SIC and SIC/XE.
7. Explain Ultra sparc architecture
UNIT-II
PART A
1. Define assembler.
An assembler is a set of programs that accepts as input an assembly
language program and gives as output its machine equivalent plus other
information to the loader.
2. Give the assembler directives.
 START- Specify name and starting address for the program.
 END-Indicate the end of the source program
 BYTE- Generate character or hexadecimal constant, occupying as many
bytes as needed to represent the constant.
 WORD-Generate one word integer constant.
 RESB-Reserve the indicated number of bytes for a data area.
 RESW-Reserve the indicated number of words for a data area.
3. What are the functions required to translate source program to object
program?
 Converts mnemonic operation codes to their machine language
equivalents.
 Converts symbolic operands to their equivalent machine addresses.
 Builds the machine instructions in the proper format.
 Converts the data constant specified in the source program into their
internal machine representations.
 Writes the object program and assembly listing.
4. What are the functions of Pass 1 assembler?
a) Assign addresses to all statements in the program
b) Save the values assigned to all labels for using pass-2
c) Perform some processing of assembler directives
5. What are the functions of Pass 2 assembler?
Pass2 (assemble instruction and general object program)
a) Assemble instructions.
b) Generate data values defined by BYTE, WORD etc.
c) Perform processing of assembler directives not done during Pass1.
d) Write the object program and assembling, listing.
6. Give the two major internal data structures used in the assembler.
SYMTAB is used in pass 1.
This includes the name and value for each label in the source
program together with the flags to indicate error conditions.
SYMTAB & OPTAB are used in pass 2.
The information in the opcode tab is predefined. Symtab used is from
the output of pass 1.
7. What are fields in symbol table of an assembler?
It includes the name and value (address) for each label in the source
program, together with flags to indicate error conditions.
8. List the machine dependent assembler features.
a) Instruction formats and addressing modes.
b) Program relocation
9. Define program relocation.
It is a program which can be loaded in any part of the main memory for
execution.
10. What are the three different records used in object
program?
• The header record, text record and the end record are the
three different records used in object program.
• The header record contains the program name,starting
address and length of the
program.
• Text record contains the translated instructions and data of
the program.
• End record marks the end of the object program and
specifies the address in the
program where execution is to begin.
11. Differentiate absolute expression and relative
expression.
If the result of the expression is an absolute value (constant)
then it is known as absolute expression.
Eg : BUFEND – BUFFER
If the result of the expression is relative to the beginning of the
program then it is known as relative expression. Label on
instructions and data areas and references to the location
counter values are relative terms.
Eg: BUFEND + BUFFER
12. Explain BASE and NOBASE assembler directives.
BASE – assembler directive used to inform the assembler that the base register
contains address for addressing purpose.
NOBASE - assembler directive used to inform the assembler that the contents of base
register can no longer be relied upon for addressing.
13. Write the format of Text record of object program.
Col. 1 T
Col. 2~7 Starting address for object code in this record (hex)
Col. 8~9 Length of object code in this record in bytes (hex)
Col. 10~69 Object code, represented in hex (2 col. per byte)
14. What is meant by literal pool?
Literal is a constant operand that is written as part the instruction that uses it. All
of the literal operands used in a program are gathered into one or more literal pools.
Normally literals are placed into a pool at the end of the program.
15. List the machine independent assembler features.
a) Literals. b) Symbol - defining statements.
c) Expressions. d) Program blocks.
e) Control sections and program linking.
16. What is meant by literal?
Literal is a constant operand that is written as part the instruction that uses it
(ie the value is stated "literally" in the instruction.)
All of the literal operands used in a program are gathered into one or more literal
pools. Normally literals are placed into a pool at the end of the program.
17. What do you meant by LTORG?
LTORG is an assembler directive. When the assembler encounters a LTORG
statement, it creates a literal pool that contains all of the literal operands used since
the previous LTORG or the beginning of the program.
18. What is meant by LITTAB?
Literal table for each literal the table contains literal name, the operand
value and length, the address assigned to the operand.

19. What are the uses of EQU assembler directive?


EQU ASSEMBLER DIRECTIVE: enter the symbol name and it’s value
into symbol table.
Ex: FIRST EQU 1000
SECOND EQU 2000
In symbol table
FIRST 1000
SECOND 2000
20. List the features of MASM Assembler.
1. Unlike 1 pass and 2-pass assembler multi pass assembler make as
many passes as are needed to process the definition of symbols.
2. It is not necessary for such an assembler to make more than two passes
over the entire program.
3. Instead the portions of the program that involve forward references in
the symbol definition are saved during pass 1.
4. Additional passes through these stored definitions are made as
assembly progresses.
5. A normal pass 2 follows this process.

PART- B
1. Explain the data structure used in the design of assembler.
2. Explain the algorithm for pass1& pass 2 of an assembler.
3. Explain the machine independent features of an assembler.
4. Explain the machine dependent features of an assembler.
5. Explain the different instruction formats & sets & addressing modes used in the
assembler.
6. Explain the design of one pass assembler.
7. Explain the design of multi pass assembler.
8. Discuss about MASM assembler.

UNIT-III
PART A
1. Define loader.
Loading brings the object program into memory for execution. A loader is
a system program that performs the loading function. Many loaders also support
relocation and linking.
2. What is the use of loader?
Bringing an object program into memory and starting its execution.
3. Define bootstrap loader.
When a computer is first turned on or restarted, a special type of absolute
loader, called a bootstrap loader, is executed. This bootstrap loader loads the first
program to be run by the computer-usually an operating system.
4. Define relocating loaders.
Loaders that allow for program relocation are called relocating loaders or
relative loaders. A Modification record is used to describe each part of the object
code that must be changed when the program is relocated.
5. What is a linking loader?
A linking loader performs all linking and relocation operations, including
automatic library search if specified, and loads the linked program directly into
memory for execution.
6. Give the main internal data structures used in the linking loader.
External Symbol Table ESTAB analogous to symbol table to store the
name and address of each external symbol in the set of control sections being
loaded.
7. List the disadvantages of absolute loader:
For an absolute loader, the address at which the program is to be loaded must be
specified beforehand. Also, it is not possible to load just the required subroutines
alone. Thus it is disadvantageous as it is inefficient in terms of both space and
execution time.
8. What are the different ways in which relocation is implemented by a
relocation loader in SIC & SIC/XE architecture?
In SIC architecture, since most of the instructions use direct addresses and need
modification during program relocation, relocation bits are used by the relocation
loader. Whereas, in SIC/XE architecture, since only a few instructions require
modification as the others use relative addresses modification records are used by
the relocation loader.
9. What is the advantage of reference-number mechanism in the refer and
modification records?
The reference-number mechanism assigns a reference number to each external
symbol referred to in a control section. This reference number is used in
modification records. The advantage of this mechanism is that it avoids multiple
searches of ESTAB for the same symbol during the loading of a control section.
An external reference symbol can be looked up in ESTAB once for each control
section that uses it. The values for code modification can be obtained by simply
indexing into an array of these values.
10. What is the purpose of relocation bits in object programs for relocatable
loader?
On a machine like SIC that primarily uses direct addressing, most of the
instructions have to be modified during program relocation. Thus it is not possible
to write modification record for each instruction. Therefore we use the relocation
bits in the text record which help to identify the instructions that require
modification.
11. Define PROGADDR and CSADDR.
PROGADDR and CSADDR are the important variables of linking loader.
PROGADDR is the beginning address in memory where the linked program is to
be loaded. Its value is supplied to the loader by the operating system.
12. Define DEFINE record and REFER record :
DEFINE record is a record that gives information about the external symbols
defined in the current control section, i.e., the symbols named by EXTDEF.
13. What are the differences between linking loader and linkage editor?
A linking loader performs all linking and relocation operations including
automatic library search and loads the linked program directly into memory for
immediate execution. Linking loader can be preferred when a program is to be
executed several times with each time reassembled.
Whereas, a linkage editor stores the linked version of the program in a file or
library for later execution. At the time of execution, a relocatable loader is used to
load the linked program into memory. Linkage editor can be preferred when a
program is to be executed several times without being reassembled.
14. What do you meant by automatic library search?
The linking loaders automatically incorporate routines from a subprogram
library into the program being loaded. These subroutines are automatically
fetched from the library, linked with the main program and loaded. This is called
automatic library search.
15. What is load map table?
Load map table contains the external symbols defined in the set of control
sections together with the address assigned to each. Loaders include as an option
and the ability to print the load map that includes these symbols and their
addresses.
16. Write the use of ESTAB.
ESTAB is used to store the name and address of each external symbol in the set of
control section being loaded.
17. List the Machine-independent loader features.
i) Automatic library search
ii) Loader options
18. Define Linkage loader.
A linkage editor, on the other hand, produces a linked version of the
program (often called a load module or an executable image), which is written to
a file or library for later execution.
19. Define dynamic linking.
A scheme that postpones the linking function until execution time; a
subroutine is loaded and linked to the rest of the program when it is first called.
This type of function is usually called dynamic linking, dynamic loading, or load
on call.
20. Define MS-DOS Linker.
MS-DOS Linker is a linkage editor that combines one or more object
modules to produce a complete executable program.

PART-B
1. Discuss briefly about absolute loader.
2. Discuss about Bootstrap Loader.
3. Explain Automatic Library Search.
4. Discuss about Linkage editor.
5. Discuss about Dynamic Linking.
6. Give the algorithm for pass 1 and pass 2 of a loader.
7. Discuss machine independent loader features.
8. Discuss machine dependent loader features.
9. Explain about MS-DOS Linker.

UNIT-IV
PART-A
1. Define macro definition and macro expansion.
A macro definition is enclosed between a macro header (MACRO) and a
macro end (MEND) statements. Macro definition is typically located at the start
of the program.
The macro processor replaces each macroinstruction with corresponding
group of source language statements. This is called expanding the macros.
2. What are the functions of a macro processor?
The functions of a macro processor involve the substitution of one group
of characters or lines for another.
3. What is the new assembler directives used in macro definition.
MACRO---identifies the beginning of a macro definition.
MEND --- identifies the end of a macro definition.
4. Give the macroinstructions used by a SIC/XE program.
RDBUFF---To read record into buffer.
WRBUFF--- To write record into buffer.
5. What is conditional macro expansion?
Most macro processors can also modify the sequence of statements
generated for a macro expansion depending on the arguments supplied in the
macro invocation.
The use of IF-ELSE-ENDIF structure provides a mechanism for either
generating (once) or skipping selected statements in the macro body.
The use of WHILE-ENDW structure provides a mechanism for
generating the set of statements enclosed within loop repeatedly as long as a
particular condition is true.
6. What is the use of macro time variable?
Macro time variable can be used to store working values during the macro
expansion. Any symbol that begins with the character & and then is not a macro
instruction parameter is assumed to be a macro time variable.
7. What is meant by positional parameters?
If the parameters and arguments were associated with each other
according to their positions in the macro prototype and the macro invocation
statement, then these parameters in macro definitions are called as positional
parameters.
8. Consider the macro definition
#Define DISPLAY(EXPR) Printf(“EXPR = %d\\n”,EXPR)
Expand the macro instruction DISPLAY (ANS)
Ans.: Printf (“EXPR = %d\\n”, ANS)
9. What are known as nested macro call?
The statement, in which a macro calls on another macro, is called nested macro
call. In the nested macro call, the call is done by outer macro and the macro called
is the inner macro.
10. Give the advantage of line-by-line processors.
*It avoids the extra pass over the source program during assembling
*It may use some of the utility that can be used by language translators so that
can be loaded once.
11. What is meant by line-by-line processor?
This macro processor reads the source program statements, process the statements
and then the output lines are passed to the language translators as they are
generated, instead of being written in an expanded file.
12. Give the advantages of general-purpose macro processors.
*The programmer does not need to learn about a macro facility for each compiler.
*Overall saving in software development cost and a maintenance cost
13. What are the important factors considered while designing general purpose
macro processors?
 Comments
 Grouping of statements
 Tokens
 Syntax used for macro definitions
14. What is the difference between MASM macro processor and the one for
SIC?
 MASM PROCESSOR SIC
 The labels are unique names ??0000(??0001 to ??ffff)¬
 .ERR signals the MASM that an error has been detected¬
 ;; denotes the macro comment which is skipped during expansion and used
for¬ readability
 Macro parameter need not begin with¬ & ¬or any other special character
The labels are given as ?AA to ?ZZ
15. What is meant by concatenation of macro parameter?
Most macro processors allow parameters to be concatenated with other
character string. Suppose that the parameter to such a macroinstruction is named
&ID. The body of the macro definition might contain a statement like: LDA
X&ID in which the parameter &ID is concatenated after the character string X.
16. Give the main data structures used in macro processors features.
a) DEFTAB -Macro definition is stored in this table
b) NAMTAB -The macro names are entered here
c) ARGTAB -It refers an argument table.
17. List the Machine-independent macro processor.
i) Concatenation of macro parameters
ii) Generation of unique level
iii) Conditional Macro Expansion
iv) Keyword macro parameters.
18. What is the difference between macro invocation and subroutine call?
The most significant difference between macro invocation and subroutine
call is the statements that form the expansion of a macro are generated each
time, when the macro is invoked but the statements in a subroutine appear only
once regardless of how many times the subroutine is called.
19. List the features of MASM macro processor.
 The macro processor of MASM is integrated with Pass 1 of the
assembler.
 Macros may be redefined within the program without causing an error.
 The main difference between MASM macro processor and that of SIC
lies in the nature of the conditional macro expansion statements.
MASM calls these CONDITIONAL ASSEMBLY statements.
 The macro parameters in MASM need not begin with & or any other
special character.
 The end of the macro is marked by ENDM.
20. Define a macro in C Language.
#define MAX(A,B) ( A > B ) ? ( A) : ( B )
main()
{
int j,k;
j = 10;
k = 500;

printf(“ This programs finds the max of two values \n”);


printf(“ The Maximum of (10,500) is = %d”, MAX( j,k ) ) ;
}

PART-B
1. Write the algorithm for Macro processor.
2. Write the machine independent features macro processor.
3. Write about recursive macro expansion.
4. Discuss about MASM macro processor.
5. Discuss about ANSI C Language.
6. Discuss about conditional Macro.
UNIT-V
PART-A
1. Define interactive editor.
Interactive Editor is a computer program that allows a user to create and revise
a target document.
2. Give the tasks of document-editing process.
1. Select the part of the target document to viewed and manipulated.
2. Determine how to format this view online & how to display it.
3. Specify and Execute operations that modify the target document.
4. Update the view appropriately.
3. Mention some of the user interface and its uses.
Keyboard Mouse Light Pen Digitizer
Joy Stick.
4. What are the three categories of editor’s devices?
 Text device/ String devices
 Button device/Choice devices
 Locator device
5. What is the function performed in editing phase?
In the actual editing phase, the target document is created or altered with a
set of operations such as insert, delete, replace, move and copy.
6. What is the function performed in voice input device?
Voice-input devices, which translate spoken words to their textual equivalents,
may prove to be the text input devices of the future. Voice recognizers are
currently available for command input on some systems.
7. What are called tokens?
The lexical analyzer tracks the source program one character at a time by making
the source program into sequence of atomic units is called tokens.
8. Name some of typical tokens.
Identifiers, keywords, constants, operators and punctuation symbols such as
commas and parentheses are typical tokens.
9. Name some of text editors.
• Line editors
• Stream editors
• Screen editors
• Word processors
• Structure editors
10. Give the components of editor.
• Command Language Processor
• Editing Component & Display Component
• Travelling Component & Viewing Component
• Editing Filter and Viewing Filter.
11. What is the function of Interactive debugging systems?
It provides the programmer with facilities that aid in testing and
debugging of programs. They allow you to see what is going on ``inside'' another
program while it executes--or what another program was doing at the moment it
crashed.
gdb interactive debugger available in Linux environment.
GDB to debug programs written in C, C++, and Modula-2. GDB is invoked
with the shell command gdb.
12. Define debugging.
Debugging is the process of removing an error in the program during
Compilation.
13. Mention the Debugging functions and its uses.
Tracing-- It is used to track the flow of execution logic and data modifications.
Traceback—Show the path by which the current statement was reached.
14. Define Line Editor:
They allowed editing operations within a single line or integral number of lines.
15. What is the work of a command – language processor in an editor?
It accepts inputs from the users and analyses tokens and syntactic structure of
commands.
16. Write about viewing component of the editor.
In viewing a document, the start area to be viewed is determined by the current
viewing pointer. This pointer is maintained by viewing component of the editor.
Viewing component is a collection of modules responsible for detemaining the
next view.
17. Define user interface?
User interface is one, which allows the user to communicate with the system in
order to perform certain tasks. User interface is generally designed in a computer
to make it easier to use.
18. What are the basic types of computing environments used in editors
functions?
Editor’s function in three basic types of computing environments
i.Time sharing
ii.Stand-alone
iii.Distributed
19. What are the methods in Interaction language of a text editor?
a. Typing –oriented or text command oriented method
b. Function key interfaces
c. Menu oriented method
20. Define Locator device?
Locator devices are two-dimensional analog-to-digital converters that
position a cursor symbol on the screen by observing the user’s movement of the
device. The most common such devices for editing applications are the mouse and the
data tablet.
PART-B

1. Explain the text editor in detail.


2. Explain the overview of editing process.
3. Explain the salient features of an Interactive Debugging system in detail.
4. Write short notes on
 User interface
 Debugging functions and capabilities.

@@@@@@@@@@@

You might also like