Cs2304 - System Software (SS) Question Bank Two Mark Question & Answers
Cs2304 - System Software (SS) Question Bank Two Mark Question & Answers
Cs2304 - System Software (SS) Question Bank Two Mark Question & Answers
/
k
t
.
e
b
u
t
e
s
c
/
/
:
p
4. Define loader.
Loader is a set of program that loads the machine language translated by the
translator into the main memory and makes it ready for execution.
t
t
h
opcode
0
L
78
15 16
B1
19 20
D1
31 32
B2
35 36
D2
47
It is a 6 byte instruction used to move L+I bytes data from the storage location1
to the storage location2.
Storage location1 = D1+ [B1]
Storage location2 = D2+ [B2]
http://csetube.weebly.com/
Page 1 of 18
7. Give any two differences between base relative addressing and program counter
relative addressing used in SIC/XE.
Base relative addressing
PC relative addressing
aTarget address is calculated using the The target address is calculated using the
formula
formula
Target address = Displacement + [B]
Target address = Displacement + [PC]
B-base register
PC-program counter
Displacement lies between 0 to 4095
Displacement lies between 2048 to 2047
8. Define indirect addressing
In the case of immediate addressing the operand field gives the memory
location.The word from the given address is fetched and it gives the address of the operand.
Eg:ADD R5, [600]
Here the second operand is given in indirect addressing mode. First the word in
memory location 600 is fetched and which will give the address of the operand.
/
k
t
.
e
b
u
t
e
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 2 of 18
/
k
t
.
e
b
14. What are the instruction formats used in SIC/XE architecture? Give any one format.
Format 1 (1 byte), Format 2 (2 bytes), Format 3 (3 bytes) & Format 4(4 bytes)
Are the different instructions used in SIC/XE architecture?
Format 2:
8
4
4
OPCODE
R1
R2
u
t
e
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 3 of 18
Register direct, register deferred, auto increment and decrement, program counter
relative, base relative, index register mode and indirect addressing are the various
addressing modes in VAX architecture.
19. How do you calculate the actual address in the case of register indirect with
immediate index mode?
Here the target address is calculated using the formula
T.A = (register) + displacement.
20.
/
k
t
.
e
b
u
t
e
s
c
/
/
:
p
t
t
h
UNIT II-ASSEMBLERS
http://csetube.weebly.com/
Page 4 of 18
.
80
.
.
.
1036
RETADR
RESW
1
The first instruction contains a forward reference RETADR. If we attempt to
translate the program line by line, we will unable to process the statement in line10 because
we do not know the address that will be assigned to RETADR .The address is assigned
later(in line 80) in the program.
/
k
t
The symbol table includes the name and value for each symbol in the source
program, together with flags to indicate error conditions. Sometimes it may contain details
about the data area.
SYMTAB is usually organized as a hash table for efficiency of insertion and
retrieval.
.
e
b
u
t
e
s
c
/
/
:
p
t
t
h
EQU-it allows the programmer to define symbols and specify their values directly.
The general format is
Symbol
EQU
value
* ORG-it is used to indirectly assign values to symbols. When this statement is
encountered the assembler resets its location counter to the specified value.
The general format is
ORG
value
In the above two statements value is a constant or an expression involving constants
and previously defined symbols.
*
http://csetube.weebly.com/
Page 5 of 18
10. Write the steps required to translate the source program to object program.
11. What is the use of the variable LOCCTR (location counter) in assembler?
/
k
t
.
e
b
u
t
e
s
c
/
One pass assembler that generates their object code in memory for immediate
execution is known as load and go assembler. Here no object programmer is written out and
hence no need for loader.
/
:
p
13. What are the two different types of jump statements used in MASM assembler?
t
t
h
Near jump
A near jump is a jump to a target in the same segment and it is assembled by
using a current code segment CS.
Far jump
A far jump is a jump to a target in a different code segment and it is assembled
by using different segment registers.
14. What are the uses of base register table in AIX assembler?
A base register table is used to remember which of the general purpose registers are
currently available as base registers and also the base addresses they contain. USING
statement causes entry to the table and. DROP statement removes the corresponding table
entry.
http://csetube.weebly.com/
Page 6 of 18
17.
Write down the pass numbers(PASS 1/ PASS 2) of the following activities that
occur in a two pass assembler:
a. Object code generation
b. Literals added to literal table
c. Listing printed
d. Address location of local symbols
Answer:
a. Object code generation - PASS 2
b. Literals added to literal table PASS 1
c. Listing printed PASS2
d. Address location of local symbols PASS1
/
k
t
.
e
b
u
t
e
The assembler feature that does not depend upon the machine architecture is known
as machine independent assembler features.
Eg: program blocks, Literals.
19. How the register to register instructions are translated in assembler?
In the case of register to register instructions the operand field contains the register
name. During the translation first the object code is converted into its corresponding
machine language equivalent with the help of OPTAB. Then the SYMTAB is searched for
the numeric equivalent of register and that value is inserted into the operand field.
Eg:
125
1036 RDREC
CLEAR
X
B410
B4-macine equivalent of the opcode CLEAR
10-numeric equivalent of the register X.
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 7 of 18
22. What is the difference between the assembler directive EXTREF and EXTDEF.
EXTDEF names external symbols that are defined in a particular control section and may be
used by other sections. EXTREF names external symbols that are referred in a particular
control section and defined in another control section.
23. Give the general format of define record.
This record gives information about external symbols that are defined in a
particular control section. The format is
Col 1
D
Col 2-7
name of external symbol defined in this control section
Col 8-13
relative address of the symbol with in this control section
Col 14-73
name and relative address for other external symbols.
/
k
t
The assembler directive START gives the name and starting address of the program.
The format is
PN
START
1000
Here PN name of the program
1000-starting address of the program.
.
e
b
u
t
e
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 8 of 18
/
k
t
It is used to store the name and address of the each external symbol. It also indicates
in which control section the symbol is defined.
.
e
b
u
t
e
It gives the beginning address in memory where the linked program is to be loaded.
The starting address is obtained from the operating system.
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 9 of 18
The linking loader performs the process of linking and relocation. It includes the
operation of automatic library search and the linked programs are directly loaded into the
memory.
15. Give the difference between linking loader and linkage editors.
Linking loader
Linkage editor
The relocation and linking is performed It produces a linked version of a program
each time the program is loaded
and which is written in a f ile for later
Here the loading can be accomplished in execution two passes are required
a single
16. Define dynamic linking.
If the subroutine is loaded and linked to the program during its first call (run
time), then it is called as dynamic loading or dynamic linking.
/
k
t
a) It has the ability to load the routine only when they are needed
b) The dynamic linking avoids the loading of entire library for each execution
.
e
b
In static executable, all external symbols are bound and ready to run. In dynamic
executables some symbols are bound at run time.
u
t
e
s
c
/
The data divided among processing element is called shared data. If the data is
not shared among processing elements then it is called private data.
/
:
p
Begin
Read Header record
Verify program name and length
Read first text record
While record type != E do
Begin
Moved object code to specified location in memory
Read next object program record
End
Jump to address specified in End record
t
t
h
UNIT IV
(MACRO PROCESSORS)
http://csetube.weebly.com/
Page 10 of 18
These statements give the name of the macroinstruction being invoked and the
arguments to be used in expanding the macros. These statements are also known as
macro call.
3. What are the directives used in macro definition?
MACRO - it identifies the beginning of the macro definition
MEND - it marks the end of the macro definition
4. What are the data structures used in macro processor?
DEFTAB the macro definitions are stored in a definition table ie it contains a macro
prototype and the statements that make up the macro body.
NAMTAB it is used to store the macro names and it contains two pointers for each
macro instruction which indicate the starting and end location of macro definition in
DEFTAB. It also serves as an index to DEFTAB
ARGTAB it is used to store the arguments during the expansion of macro
invocations.
5. Define conditional macro expansion.
If the macro is expanded depends upon some conditions in macro definition
(depending on the arguments supplied in the macro expansion) then it is called as
conditional macro expansion.
/
k
t
.
e
b
u
t
e
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 11 of 18
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.
13. 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.
14. 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
15. What is meant by general-purpose macro processors?
The macro processors that are not dependent on any particular programming
language, but can be used with a variety of different languages are known as general
purpose macro processors.
Eg. The ELENA macro processor.
/
k
t
16. What are the important factors considered while designing a general purpose
macro processors?
comments
grouping of statements
tokens
syntax used for macro definitions
.
e
b
u
t
e
s
c
/
/
:
p
t
t
h
(TEXT EDITORS)
http://csetube.weebly.com/
Page 12 of 18
/
k
t
.
e
b
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.
u
t
e
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 13 of 18
/
k
t
.
e
b
u
t
e
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 14 of 18
An output device is the user to view the elements being edited and the results of
the editing operations.
/
k
t
The command language processor accepts input from the users input devices
and analyzes the tokens and syntactic structure of the commands.
.
e
b
u
t
e
s
c
/
25. What are the basic types of computing environments used in editors functions?
/
:
p
t
t
h
http://csetube.weebly.com/
Page 15 of 18
Memory
Registers
Data Format
Instruction format
Addressing modes
Instruction sets
SIC/XE
Here there are nine registers.
A, X, L, SW, PC, B, S, T and F
There is no floating point hardware
Only one instruction format is used formats
Here there are many addressing modes
/
k
t
.
e
b
u
t
e
s
c
/
/
:
p
t
t
h
UNIT-III
CS2304 - System Software
http://csetube.weebly.com/
Page 16 of 18
/
k
t
.
e
b
UNIT-IV
u
t
e
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 17 of 18
/
k
t
.
e
b
u
t
e
s
c
/
/
:
p
t
t
h
http://csetube.weebly.com/
Page 18 of 18