Sei sulla pagina 1di 29

www.nskinfo.

com College Student and faculty website


Department of nskinfo-i education
CS2304 SYSTEM SOFTWARE 3 1 0 4

UNIT I INTRODUCTION 8
System software and machine architecture - The Simplified Instructional Computer(SIC) -
Machine architecture - Data and instruction formats - addressing modes -instruction sets - I/O
and programming

UNIT II ASSEMBLERS 10
!asic assem"ler functions - # simple SIC assem"ler - #ssem"ler algorithm and data structures -
Machine dependent assem"ler features - Instruction formats and addressing modes - $rogram
relocation - Machine independent assem"ler features - %iterals - Sym"ol-defining statements -
&'pressions - One pass assem"lers and Multi pass assem"lers - Implementation e'ample -
M#SM assem"ler

UNIT III LOADERS AND LINKERS 9
!asic loader functions - Design of an #"solute %oader - # Simple !ootstrap %oader - Machine
dependent loader features - (elocation - $rogram %in)ing - #lgorithm and Data Structures for
%in)ing %oader - Machine-independent loader features - #utomatic %i"rary Search - %oader
Options - %oader design options - %in)age &ditors - Dynamic %in)ing - !ootstrap %oaders -
Implementation e'ample - MSDOS lin)er

UNIT IV MACRO PROCESSORS 9
!asic macro processor functions - Macro Definition and &'pansion - Macro $rocessor #lgorithm
and data structures - Machine-independent macro processor features - Concatenation of Macro
$arameters - *eneration of +ni,ue %a"els - Conditional Macro &'pansion - -eyword Macro
$arameters-Macro within Macro-Implementation e'ample - M#SM Macro $rocessor - #.SI C
Macro language

UNIT V SYSTEM SOFTWARE TOOLS 9
Te't editors - O/er/iew of the &diting $rocess - +ser Interface - &ditor Structure - Interacti/e
de"ugging systems - De"ugging functions and capa"ilities - (elationship with other parts of the
system - +ser-Interface Criteria

TEXT BOOK:
0 %eland % !ec)1 2System Software - #n Introduction to Systems $rogramming31 4rd
&dition1 $earson &ducation #sia1 5667

REFERENCES:
0 D M Dhamdhere1 2Systems $rogramming and Operating Systems31 Second
(e/ised &dition1 Tata Mc*raw-8ill1 5666
5 9ohn 9 Dono/an 2Systems $rogramming31 Tata Mc*raw-8ill &dition1 5666
4 9ohn ( %e/ine1 %in)ers : %oaders - 8arcourt India $/t %td1 Morgan -aufmann
$u"lishers1 5666
- 1 -


UNIT I INTRODUCTION
1 D!"#$! %&%'!( %)"'*+,!-A.,#/0M+&-200312 -N)30D!4 200512- A.,0M+& 20081
It consists of /ariety of programs that supports the operation of the computer This software
ma)es it possi"le for the user to focus on the other pro"lems to "e sol/ed with out needing to
)now how the machine wor)s internally &g; operating system1 assem"ler1 loader
2 6#3! %)(! +../#4+'#)$% )" ).!,+'#$7 %&%'!(
Operating system acts as an interface "etween the user and the system
o To ma)e the computer easier to use
o To manage the resources in computer
o $rocess management
o Data and memory management
o To pro/ide security to the user
3 D!"#$! 4)(.#/!, +$8 #$'!,.,!'!,
Compiler is a set of program which con/erts the whole high le/el language program to machine
language program
Interpreter is a set of programs which con/erts high le/el language program to machine language
program line "y line
4 D!"#$! /)+8!,
%oader is a set of program that loads the machine language translated "y the translator into the
main memory and ma)es it ready for e'ecution
9 W:+' #% ':! $!!8 )" MAR ,!7#%'!,;
M#( (memory address register) is used to store the address of the memory from which the data
is to "e read or to which the data is to "e written
< D,+* SS #$%',=4'#)$ "),(+'
6 < = 0> 07 0? 56 40 45 4>47 @<
It is a 7 "yte instruction used to mo/e %AI "ytes data fro the storage location0 to the storage
location5
Storage location0 B D0 A C!0D
Storage location5 B D5 A C!5D
&g; MOE 761@66(4)1 >66(@)
5 6#3! +$& '*) 8#""!,!$4!% >!'*!!$ >+%! ,!/+'#3! +88,!%%#$7 +$8 .,)7,+( 4)=$'!, ,!/+'#3!
+88,!%%#$7 =%!8 #$ SIC0XE -N)30D!4 200<1
!ase relati/e addressing
The Target address is calculated using the formula
Target address B Displacement A C!D
!-"ase register
Displacement lies "etween 6 to @6?>
- 2 -
$C relati/e addressing
8ere the target address is calculated using the formula
Target address B Displacement A C$CD
$C-program counter
Displacement lies "etween -56@= to 56@<
8 D!"#$! #$8#,!4' +88,!%%#$7
In the case of immediate addressing the operand field gi/es the memory location The word from
the gi/en address is fetched and it gi/es the address of the operand &g; #DD (>1 C766D
8ere the second operand is gi/en in indirect addressing mode First the word in memory location
766 is fetched and which will gi/e the address of the operand
9 D!"#$! #((!8#+'! +88,!%%#$7
In this addressing mode the operand /alue is gi/en directly There is no need to refer memory
The immediate addressing is indicated "y the prefi' GHG
&g; #DD H> in this instruction one operand is in accumulator and the second operand is a
immediate /alue the /alue > is directly added with the accumulator content and the result is
stored in accumulator
10 L#%' )=' +$& '*) CISC +$8 RISC (+4:#$!
CISC -$ower $C1 Cray T4&
(ISC - E#I1 $entium $ro architecture
11 F)//)*#$7 #% + (!(),& 4)$"#7=,+'#)$:
A88,!%% V+/=! R!7#%'!, R
1 9 9
9 5
< 9
W:+' #% ':! ,!%=/' )" ':! ")//)*#$7 %'+'!(!$';
#DD 7(immediate) to ( (indirect)
8ere 7 is the immediate data and the ne't /alue is indirect data ie the register contains the
address of the operand 8ere the address of the operand is > and its corresponding /alue is <
7 A C(D B 7A C>D B 7A < B04
12 F)//)*#$7 #% + (!(),& 4)$"#7=,+'#)$:
A88,!%% V+/=! R!7#%'!, R
4 9 <
9 5
< 2
W:+' #% ':! ,!%=/' )" ':! ")//)*#$7 %'+'!(!$';
S+! @(direct) to ( (direct)
8ere one operand is in the address location @(direct addressing) and the ne't operand is in the
register (register direct)
The resultant /alue is ? -7 B4
13 W:+' #% ':! $+(! )" A2 X +$8 L ,!7#%'!, #$ SIC (+4:#$! +$8 +/%) %.!4#"& #'% =%!
-N)30D!4 200<1
- 3 -
A-#ccumulator +sed for arithmetic operation ie in the case of arithmetic operations one operand
is in the accumulator1 and other operand may "e a immediate /alue1 register operand or memory
content The operation gi/en in the instruction is performed and the result is stored in the
accumulator register
X- Inde' (egister used for addressing
L-lin)age (egister It is used to store the return address in the case of Jump to su"routine (9S+!)
instructions
14 W:+' +,! ':! #$%',=4'#)$ "),(+'% =%!8 #$ SIC0XE +,4:#'!4'=,!; 6#3! +$& )$! "),(+'
Format 0 (0 "yte)1 Format 5 (5 "ytes)1 Format 4 (4 "ytes) : Format @(@ "ytes)

19 C)$%#8!, ':! #$%',=4'#)$% #$ SIC0 XE .,)7,+((#$7
10 1000 LEN6T? RESW 4
20 ----- NEW WORD 3
W:+' #% ':! 3+/=! +%%#7$ ') ':! %&(>)/ NEW;
In the line 06 the address is 0666 and the instruction is (&SK @It reser/es @ word (4 ' @B05)
area for the sym"ol %&.*T8 8ence 05 is added to the %OCCT(
Thus the /alue of the sym"ol .&K is 0666A05 B066C
1< W:+' #% ':! 8#""!,!$4! >!'*!!$ ':! #$%',=4'#)$% LDA @ 3 +$8 LDA T?REE;
In the first instruction immediate addressing is used 8ere the /alue 4 is directly loaded into the
accumulator register In the second instruction the memory reference is used 8ere the address
(address assigned for the sym"ol T8(&&) is loaded into the accumulator register
15 D#""!,!$'#+'! ',+#/#$7 $=(!,#4 +$8 /!+8#$7 %!.+,+'! $=(!,#4
The numeric format is used to represent numeric /alues with one digit per "yte In the numeric
format if the sign appears in the last "yte it is )nown as the trailing numeric If the sign appears
in a separate "yte preceding the first digit then it is called as leading separate numeric
18 W:+' +,! ':! +88,!%%#$7 ()8!% =%!8 #$ VAX +,4:#'!4'=,!;
(egister direct1 register deferred1 auto increment and decrement1 program counter relati/e1 "ase
relati/e1 inde' register mode and indirect addressing are the /arious addressing modes in E#I
architecture
19 W:+' #% I$8!A +88,!%%#$7 ()8!; ?)* 8) &)= 4+/4=/+'! ':! +4'=+/ +88,!%% #$ ':! 4+%! )"
,!7#%'!, #$8#,!4' *#': #((!8#+'! #$8!A ()8!; -N)30D!4 20051
In Inde' addressing mode target address is calculated using the formula
T# B (register) A displacement
20 W,#'! ':! %!B=!$4! )" #$%',=4'#)$% ') .!,"),( ':! ).!,+'#)$ BETA C ALP?A D 1 =%#$7
SIC #$%',=4'#)$%
%D# #%$8#
- 4 -
#DD O.&
ST# !&T#
L L
#%$8# (&SK 0
!&T# (&SK 0
O.& (&SK 0
21 W,#'! ':! %!B=!$4! )" #$%',=4'#)$% ') .!,"),( ':! ).!,+'#)$ BETA C ALP?AD9 =%#$7
SIC0XE #$%',=4'#)$%
%D# #%$8#
#DD H0
ST# !&T#
L L
#%$8# (&SK 0
!&T# (&SK 0
22 W:+' #% ':! =%! )" TD #$%',=4'#)$ #$ SIC +,4:#'!4'=,!; -M+&0E=$! -200<1
The test de/ice (TD) instruction tests whether the addressed de/ice is ready to send or recei/e a
"yte of data The condition code is set to indicate the result of this test Setting of M means the
de/ice is ready to send or recei/e1 and B means the de/ice is not ready
23 D,+* ':! #$%',=4'#)$ "),(+' )" SIC 4)(.='!, -N)30D!4 20081
= 0 0>
Op
co
de
I #ddress
24 ?)* #% + "/)+'#$7 .)#$' 3+/=! ,!.,!%!$'!8 =%#$7 !A.)$!$' #$ SIC; -M+&0E=$! -200<1
There is no floating point representation in standard /ersion of SIC
29 W:+' #% ':! =%! )" SVC #$%',=4'#)$ #$ SIC; -N)30D!4 20091
&'ecuting super/isor call instruction (SCE) generates an interrupt that can "e used for
communication with the operating system
2< W:+' +,! ':! +88#'#)$+/ ,!7#%'!,% .,)3#8!8 #$ SIC0XE ':+$ SIC; -N)30D!4 20091
Mnemonic Number Special use
! 4 !ase registerN used for addressing
S @ *eneral wor)ing register1 no special use
T > *eneral wor)ing register1 no special use
F 7 Floating-point accumulator (@= "its)

25 D#%'#$7=#%: >!'*!!$ 8#,!4' +88,!%%#$7 +$8 #$8#,!4' +88,!%%#$7 -M+&0E=$! -200<1
Direct addressing; T#Baddress as gi/en in instruction (eg) 9S+! (D(&C
Indirect #ddressing; T# B (address) an address is gi/en in the instruction that points to another
address that contains the data (eg) 9 O(&T#D(
28 EA./+#$ ':! '!,( V#,'=+/ +88,!%% %.+4! -3#,'=+/ (!(),&1
The /irtual memory allows programs to operate as though they had access to an e'tremely large
- 5 -
memory1 regardless of the amount of memory actually present on the system For &g E#I
architecture supports /irtual address space
29 EA./+#$ +>)=' ',+#/#$7 +$8 /!+8#$7 $=(!,#4;
T,#+/#$7 N=(!,#4: .umeric format is used to represent numeric /alues with one digit per "yte
In this format if sign appears in the last "yte then it is called Trialing numeric
L!+8#$7 N=(!,#4: If sign appears as a separate "yte preceding the first digit called leading
separate numeric.
30. What is little Endian Byte ordering?
The least signifcant part of a numeric value is stored at the lower numbered
address. This is called little endian byte ordering because the little end! of the
value comes frst in memory.
UNIT II ASSEMBLERS

1 D!"#$! ':! >+%#4 "=$4'#)$% )" +%%!(>/!,
Ptranslating mnemonic operation codes to their machine language e,ui/alents
P#ssigning machine addresses to sym"olic la"els used "y the programmer
2 W:+' #% (!+$' >& +%%!(>/!, 8#,!4'#3!%; 6#3! !A+(./!
These are the statements that are not translated into machine instructions1 "ut they pro/ide
instructions to assem"ler itself
&'ample ST#(T1 &.D1 !QT&1 KO(D1 (&SK and (&S!
3 W:+' #% + "),*+,8 ,!"!,!$4!;
It is a reference to a la"el that is defined later in a program
Consider the statement
06 0666 ST% (&T#D(

=6 0647 (&T#D( (&SK 0
The first instruction contains a forward reference (&T#D( If we attempt to translate the
program line "y line1 we will una"le to process the statement in line06 "ecause we do not )now
the address that will "e assigned to (&T#D( The address is assigned later(in line =6) in the
program
4 W:+' +,! ':! ':,!! 8#""!,!$' ,!4),8% =%!8 #$ )>F!4' .,)7,+(;
The header record1 te't record and the end record are the three different records used in o"Ject
program The header record contains the program name1 starting address and length of the
program Te't record contains the translated instructions and data of the program &nd record
mar)s the end of the o"Ject program and specifies the address in the program where e'ecution is
to "egin
9 W:+' #% ':! $!!8 )" SYMTAB -%&(>)/ '+>/!1 #$ +%%!(>/!,;
The sym"ol ta"le includes the name and /alue for each sym"ol in the source program1 together
with flags to indicate error conditions Some times it may contain details a"out the data area
SQMT#! is usually organiRed as a hash ta"le for efficiency of insertion and retrie/al
- 6 -
< W:+' #% ':! $!!8 )" OPTAB -).!,+'#)$ 4)8! '+>/!1 #$ +%%!(>/!,;
The operation code ta"le contains the mnemonic operation code and its machine language
e,ui/alent Some assem"lers it may also contain information a"out instruction format and length
O$T#! is usually organiRed as a hash ta"le1 with mnemonic operation code as the )ey
5 W:+' +,! ':! %&(>)/ 8!"#$#$7 %'+'!(!$'% 7!$!,+//& =%!8 #$ +%%!(>/!,%;
P G&S+G-it allows the programmer to define sym"ols and specify their /alues directly The
general format is sym"ol EGU /alue
P GO(*G-it is used to indirectly assign /alues to sym"ols Khen this statement is encountered the
assem"ler resets its location counter to the specified /alue
The general format is OR6 /alue in the a"o/e two statements /alue is a constant or an
e'pression in/ol/ing constants and pre/iously defined sym"ols
8 D!"#$! ,!/)4+'+>/! .,)7,+(
#n o"Ject program that contains the information necessary to perform re,uired modification in
the o"Ject code depends on the starting location of the program during load time is )nown as
relocata"le program
9 D#""!,!$'#+'! +>%)/='! !A.,!%%#)$ +$8 ,!/+'#3! !A.,!%%#)$
If the result of the e'pression is an a"solute /alue (constant) then it is )nown as a"solute
e'pression
&g ; !+F&.D - !+FF&(
If the result of the e'pression is relati/e to the "eginning of the program then it is )nown as
relati/e e'pression1 la"el on instructions and data areas and references to the location counter
/alues are relati/e terms
&g; !+F&.D A !+FF&(
10 W,#'! ':! %'!.% ,!B=#,!8 ') ',+$%/+'! ':! %)=,4! .,)7,+( ') )>F!4' .,)7,+(
Con/ert mnemonic operation codes to their machine language e,ui/alents
Con/ert sym"olic operands to their e,ui/alent machine addresses
!uild the machine instruction in the proper format
Con/ert the data constants specified in the source program into their internal machine
representation
Krite the o"Ject program and assem"ly listing
11 W:+' #% ':! =%! )" ':! 3+,#+>/! LOCCTR -/)4+'#)$ 4)=$'!,1 #$ +%%!(>/!,; -M+&0E=$!
-200<1
This /aria"le is used to assign addresses to the sym"ols %OCCT( is initialiRed to the "eginning
address specified in the ST#(T statement #fter each source statement is processed the length of
the assem"led instruction or data area to "e generated is added to %OCCT( and hence whene/er
we reach a la"el in the source program the current /alue of %OCCT( gi/es the address
associated with the la"el
12 D!"#$! /)+8 +$8 7) +%%!(>/!,
One pass assem"ler that generates their o"Ject code in memory for immediate e'ecution is
)nown as load and go assem"ler 8ere no o"Ject programmer is written out and hence no need
for loader
13 W:+' +,! ':! '*) 8#""!,!$' '&.!% )" F=(. %'+'!(!$'% =%!8 #$ MASM +%%!(>/!,;
- 7 -
T N!+, F=(.; # near Jump is a Jump to a target in the same segment and it is assem"led "y using
a current code segment CS
T F+, F=(.: # far Jump is a Jump to a target in a different code segment and it is assem"led "y
using different segment registers
14 W:+' +,! ':! =%!% )" >+%! ,!7#%'!, '+>/! #$ AIX +%%!(>/!,;
# "ase register ta"le is used to remem"er which of the general purpose registers are currently
a/aila"le as "ase registers and also the "ase addresses they contain
+SI.* statement causes entry to the ta"le and D(O$ statement remo/es the corresponding
ta"le entry
19 D#""!,!$'#+'! ':! +%%!(>/!, 8#,!4'#3!% RESW +$8 RESB
(&SK -It reser/es the indicated num"er of words for data area
&g; 06 0664 T8(&& (&SK 0 In this instruction one word area (4 "ytes) is reser/ed for the
sym"ol T8(&& If the memory is "yte addressa"le then the address assigned for the ne't sym"ol
is 0667
(&S! -It reser/es the indicated num"er of "ytes for data area
&g; 06 066= I.$+T (&S! 0 In this instruction one "yte area is reser/ed for the sym"ol
I.$+T 8ence the address assigned for the ne't sym"ol is 066?
1< D!"#$! ()8#"#4+'#)$ ,!4),8 +$8 7#3! #'% "),(+'
This record contains the information a"out the modification in the o"Ject code during program
relocation The general format is Col 0 M Col 5-< starting location of the address field to "e
modified relati/e to the "eginning of the program Col =-? length of the address field to "e
modified in half "ytes
15 W,#'! 8)*$ ':! .+%% $=(>!,% -PASS 10 PASS 21 )" ':! ")//)*#$7 +4'#3#'#!% ':+' )44=, #$
+ '*) .+%% +%%!(>/!,:
+ O>F!4' 4)8! 7!$!,+'#)$
> L#'!,+/% +88!8 ') /#'!,+/ '+>/!
4 L#%'#$7 .,#$'!8
8 A88,!%% /)4+'#)$ )" /)4+/ %&(>)/%
a O"Ject code generation - $#SS 5
" %iterals added to literal ta"le - $#SS 0
c %isting printed - $#SS5
d #ddress location of local sym"ols - $#SS0
18 W:+' #% (!+$' >& (+4:#$! #$8!.!$8!$' +%%!(>/!, "!+'=,!%;
The assem"ler feature that does not depend upon the machine architecture is )nown as machine
independent assem"ler features
&g; program "loc)s1 %iterals
19 ?)* ':! ,!7#%'!, ') ,!7#%'!, #$%',=4'#)$% +,! ',+$%/+'!8 #$ +%%!(>/!,;
In the case of register to register instructions the operand field contains the register name During
the translation first the o"Ject code is con/erted into its corresponding machine language
e,ui/alent with the help of O$T#! Then the SQMT#! is searched for the numeric e,ui/alent
of register and that /alue is inserted into the operand field
&g; 05> 0647 (D(&C C%&#( I !@06
!@-macine e,ui/alent of the opcode C%&#(
06-numeric e,ui/alent of the register I
- 8 -
20 W:+' #% (!+$' >& !A'!,$+/ ,!"!,!$4!%;
#ssem"ler program can "e di/ided into many sections )nown as control sections and each
control section can "e loaded and relocated independently of the others If the instruction in one
control section need to refer instruction or data in another control section the assem"ler is una"le
to process these references in normal way Such references "etween controls are called e'ternal
references
21 D!"#$! 4)$',)/ %!4'#)$
# control section is a part of the program that maintains its identity after assem"lyN each control
section can "e loaded and relocated independently of the others Control sections are most often
used for su"routines The maJor "enefit of using control sections is to increase fle'i"ility
22 W:+' #% ':! 8#""!,!$4! >!'*!!$ ':! +%%!(>/!, 8#,!4'#3! EXTREF +$8 EXTDEF
&ITD&F names e'ternal sym"ols that are defined in a particular control section and may "e
used "y other sections
&IT(&F names e'ternal sym"ols that are referred in a particular control section and defined in
another control section
23 6#3! ':! 7!$!,+/ "),(+' )" 8!"#$!% ,!4),8
This record gi/es information a"out e'ternal sym"ols that are defined in a particular control
section The format is
Col 0 D
Col 5-< name of e'ternal sym"ol defined in this control section
Col =-04 relati/e address of the sym"ol with in this control section
Col 0@-<4 name and relati/e address for other e'ternal sym"ols
24 6#3! ':! =%! )" +%%!(>/!, 8#,!4'#3! CSECT +$8 USE
CS&CT - used to di/ide the program into many control sections
+S& - used to di/ide the program in to many "loc)s called program "loc)s
29 W:+' #% ':! =%! )" ':! +%%!(>/!, 8#,!4'#3! START;
The assem"ler directi/e ST#(T gi/es the name and starting address of the program The format
is
$. ST#(T 0666
8ere
$. - .ame of the program
0666 - Starting address of the program

2< W:+' #% ':! $!!8 "), +$ +%%!(>/!, 8#,!4'#3!; -M+&0E=$! -20051
#ssem"ler directi/es are not translated into machine instruction Instead1 they pro/ide
instructions to the assem"ler itself
25 W:+' #% S&(>)/ T+>/!; ?)* #% #' =%!"=/; -N)30D!4 200<12 -M+&0E=$! -20051
Sym"ol ta"le is a data structure used to store all the la"els or sym"ols present in the assem"ly
language program along with the /alue assigned to that sym"ol During pass 0 of assem"ler1
sym"ol ta"le is used to store the /alues of the sym"ols and during pass 51 it is used to translate
the instruction "y o"tained the address of the sym"ol
28 W:+' #% + .,)7,+( >/)4H;
- 9 -
$rogram "loc) refers to segments that are rearranged within a single o"Ject program unit
29 What is Near !"#?
"n a #eat $ump the Target is in the same code segment. % near $ump is assembled
using the
Current code segment registers. The assembled machine instruction for a near $ump
occupies & or ' bytes. (g. )*+ Target.
30. What is $ar %!"#?
% far $ump is a )ump to a target in a di,erent code segment. % -ar )ump is
assembled using a
Di,erent segment register. which is specifed in an instruction prof/. The assembled
instruction
for a -ar )ump re0uires 1 bytes.
(g. )*+ -%2+T2 T%23(T
UNIT III LOADERS AND LINKERS

1 W:+' +,! ':! >+%#4 "=$4'#)$% )" /)+8!,%;
%oading - "rings the o"Ject program into memory for e'ecution
(elocation - modifies the o"Ject program so that it can "e loaded at an address different from the
location originally specified
%in)ing - com"ines two or more separate o"Ject programs and also supplies the information
needed to reference them
2 D!"#$! +>%)/='! /)+8!,
The loader1 which is used only for loading1 is )nown as a"solute loader &g !ootstrap loader
3 W:+' #% (!+$' >& >))'%',+. /)+8!,; -N)30D!4 200912 -N)30D!4 200<1
If the loading process re,uires more instructions that can "e read in single record1 this first record
causes the reading of other1 and these in turn can cause the reading of still more records This is a
special type of a"solute loader which loads the first program to "e run "y the computer (+sually
an operating system)
O(
# "oot strap loader is special type of loader1 which is e'ecuted when a computer is first turned on
or restarted It loads the first program to "e run "y the computer (+sually an operating system)
4 D!"#$! >#' (+%H
The relocation "its are gathered together following the length indicator in each te't record and
which is called as "it mas) For eg the "it mas) FFC(000000000066) specifies that the first 06
words of o"Ject code are to "e modified during relocation
9 W:+' #% ':! =%! )" ()8#"#4+'#)$ ,!4),8; -N)30D!4 20081
Modification record is used for program relocation &ach modification record specifies the
starting address and the length of the field whose /alue is to "e altered and also descri"es the
modification to "e performed
< W:+' +,! ':! 2 8#""!,!$' '!4:$#B=!% =%!8 "), ,!/)4+'#)$;
- 10 -
Modification record method and relocation "it method
5 W:+' #% ':! "=$4'#)$ )" .+%% 2 )" + /)+8!,; -M+&0E=$! -20051
$ass 5 of loader e'tracts the translated instructions and data from the o"Ject modules and "uilds
an image of the e'ecuta"le program It performs the actual loading1 relocation and lin)ing of the
program
8 W:+' #% R!/)4+'#)$ >#' (!':)8;
If the relocation "it corresponding to a word of o"Ject code is set to 01 the programGs starting
address is to "e added to this word when the program is relocated !it /alue 6 indicates no
modification is re,uired
9 W:+' +,! ,!/+'#3! -,!/)4+'#3!1 /)+8!,%;
%oaders that allow for program relocation are called relocating loaders
10 W:+' #% ':! $!!8 )" ESTAB;
It is used to store the name and address of the each e'ternal sym"ol It also indicates in which
control section the sym"ol is defined
11 W:+' #% ':! =%! )" ':! 3+,#+>/! PRO6ADDR;
It gi/es the "eginning address in memory where the lin)ed program is to "e loaded The starting
address is o"tained from the operating system
12 W,#'! ':! '*) .+%%!% )" + /#$H#$7 /)+8!,
$ass0; assigns address to all e'ternal sym"ols
$ass5; it performs actual loading1 relocation and lin)ing
14 W:+' #% ':! "=$4'#)$ )" MS-DOS LINK; -M+&0E=$! -200<1
MS-DOS %I.- is a lin)age editor that com"ines one or more o"Ject modules to produce a
complete e'ecuta"le program This e'ecuta"le program has the file e'tension &I&%I.- can
also com"ine the translated program with other modules from o"Ject code li"raries
19 D!"#$! +=')(+'#4 /#>,+,& %!+,4:
In many lin)ing loaders the su"routines called "y the program "eing loaded are automatically
fetched from the li"rary1 lin)ed with the main program and loaded This feature is referred to as
automatic li"rary search
1< L#%' ':! /)+8!, ).'#)$% INCLUDE IDELETE
The general format of I.C%+D& is I.C%+D& program name (li"rary name)This command
direct the loader to read the designated o"Ject program from a li"rary and treat it as the primary
loader input
The general format of D&%&T& command is D&%&T& Csect-name it instructs the loader to
delete the named control sections from the sets of programs loaded
15 6#3! ':! "=$4'#)$% )" ':! /#$H#$7 /)+8!, -M+&0E=$! -200<1
The lin)ing loader performs the process of lin)ing and relocation It includes the operation of
automatic li"rary search and the lin)ed programs are directly loaded into the memory The
- 11 -
relocation and lin)ing is performed each time the program is loaded It produces a lin)ed /ersion
of a program and which is written in a file for later e'ecution 8ere the loading can "e
accomplished in a single o passes are re,uired
18 D!"#$! 8&$+(#4 /#$H#$7
If the su"routine is loaded and lin)ed to the program during its first call (run time)1 then it is
called as dynamic loading or dynamic lin)ing
19 W:+' #% ':! =%! )" /#$H+7! !8#'),; -N)30D!4 20091
i Simply preparing an o"Ject program for e'ecution
ii %in)age editor can "e used to replace old /ersion of su"routine "y new su"routine
without affecting the original /ersion of all the other su"routine
iii %in)age editor can also "e used to "uild pac)age of su"routines or other control sections
that are generally used together This can "e useful when dealing with su"routine li"raries
that support high-le/el programming language
20 W,#'! ':! +83+$'+7! )" 8&$+(#4 /#$H#$7 -M+&0E=$! -20051
The dynamic lin)ing allows se/eral e'ecuting programs to share one copy of su"routine
or li"rary
It has the a"ility to load the routine only when they are needed
The dynamic lin)ing a/oids the loading of entire li"rary for each e'ecution
In an o"Ject oriented system1 dynamic lin)ing is often used for reference of software
o"Ject
21 W:+' #% (!+$' >& %'+'#4 !A!4='+>/! +$8 8&$+(#4 !A!4='+>/!;
In static e'ecuta"le1 all e'ternal sym"ols are "ound and ready to run In dynamic e'ecuta"les
some sym"ols are "ound at run time
22 W:+' #% %:+,!8 +$8 .,#3+'! 8+'+;
The data di/ided among processing element is called shared data If the data is not shared among
processing elements then it is called pri/ate data
23 W,#'! ':! +>%)/='! /)+8!, +/7),#':(
!egin
(ead 8eader record
Eerify program name and length
(ead first te't record
Khile record type UB G&G do
!egin
Mo/ed o"Ject code to specified location in memory
(ead ne't o"Ject program record
&nd
9ump to address specified in &nd record
UNIT IV MACRO PROCESSORS

- 12 -
1 D!"#$! (+4,) .,)4!%%),
Macro processor is system software that replaces each macroinstruction with the corresponding
group of source language statements This is also called as e'panding of macros
2 W:+' 8) (+4,) !A.+$%#)$ %'+'!(!$'% (!+$;
These statements gi/e the name of the macroinstruction "eing in/o)ed and the arguments to "e
used in e'panding the macros These statements are also )nown as macro call
3 W:+' #% ':! $!!8 )" + (+4,); -M+&0E=$! -200<1
# macro represents a commonly used group of statement in the source programming language
Macro instructions allow the programmer to write a shorthand /ersion of a program
4 ?)* +,! (+4,)% 8!"#$!8; -N)30D!4 -200<1
Two assem"ler directi/es (M#C(O and M&.D) are used in macro definitions The statements
inside these directi/es called as macro "ody that defined with the macro name The structure of
macro definition is
Macro name M#C(O $arameters
Statement 0
Statement 5
Macro !ody
Statement .
M&.D
9 W:+' +,! ':! 8#,!4'#3!% =%!8 #$ (+4,) 8!"#$#'#)$;
M#C(O - it identifies the "eginning of the macro definition
M&.D - it mar)s the end of the macro definition
< W:+' +,! ':! 8+'+ %',=4'=,!% =%!8 #$ (+4,) .,)4!%%),; -M+&0E=$! -20051
D&FT#! - the macro definitions are stored in a definition ta"le ie it contains a macro prototype
and the statements that ma)e up the macro "ody
.#MT#! - 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 D&FT#! It also
ser/es as an inde' to D&FT#!
#(*T#! - it is used to store the arguments during the e'pansion of macro in/ocations
5 L#%' ':! %'+'!(!$'% .,!%!$' #$ + (+4,) 8!"#$#'#)$ -N)30D!4 20091
Two assem"ler directi/es (M#C(O and M&.D) are used in macro definitions
The first M#C(O statement identifies the "eginning of a macro definition
Sym"ol in the la"el field is the name of the macro
&ntries in the operand field identify the parameters of the macro instruction
The M&.D assem"ler directi/e mar)s the end of the macro definition
8 D!"#$! 4)$8#'#)$+/ (+4,) !A.+$%#)$
If the macro is e'panded depends upon some conditions in macro definition (depending on the
arguments supplied in the macro e'pansion) then it is called as conditional macro e'pansion
- 13 -
9 W:+' #% ':! =%! )" (+4,) '#(! 3+,#+>/!;
Macro time /aria"le can "e used to store wor)ing /alues during the macro e'pansion #ny
sym"ol that "egins with the character : and then is not a macro instruction parameter is assumed
to "e a macro time /aria"le
10 W:+' +,! ':! %'+'!(!$'% =%!8 "), 4)$8#'#)$+/ (+4,) !A.+$%#)$;
IF-&%S&-&.DIF statement
K8I%&-&.DK statement
11 W:+' #% (!+$' >& .)%#'#)$+/ .+,+(!'!,%;
If the parameters and arguments were associated with each other according to their positions in
the macro prototype and the macro in/ocation statement1 then these parameters in macro
definitions are called as positional parameters
12 C)$%#8!, ':! (+4,) 8!"#$#'#)$
@D!"#$! DISPLAY-EXPR1 P,#$'"-JEXPR C K8L$M2EXPR1
&'pand the macro instruction DIS$%#Q (#.S)
$rintf (2&I$( B VdWn31 #.S)
13 ?)* ':! (+4,) #% .,)4!%%!8 =%#$7 '*) .+%%!%;
$ass0; processing of definitions
$ass 5; actual-macro e'pansion
14 6#3! ':! +83+$'+7! )" /#$! >& /#$! .,)4!%%),%
It a/oids the e'tra pass o/er the source program during assem"ling
It may use some of the utility that can "e used "y language translators so that can "e
loaded once
19 W:+' #% (!+$' >& /#$! >& /#$! .,)4!%%),;
This macro processor reads the source program statements1 process the statements and then the
output lines are passed to the language translators as they are generated1 instead of "eing written
in an e'panded file
1< 6#3! ':! +83+$'+7!% )" 7!$!,+/-.=,.)%! (+4,) .,)4!%%),%
The programmer does not need to learn a"out a macro facility for each compiler
O/erall sa/ing in software de/elopment cost and maintenance cost
15 W:+' #% (!+$' >& 7!$!,+/-.=,.)%! (+4,) .,)4!%%),%;
The macro processors that are not dependent on any particular programming language1 "ut can
"e used with a /ariety of different languages are )nown as general purpose macro processors
&g; The &%&.# macro processor
18 W:+' +,! ':! #(.),'+$' "+4'),% 4)$%#8!,!8 *:#/! 8!%#7$#$7 7!$!,+/ .=,.)%! (+4,)
.,)4!%%),%;
Comments
- 14 -
*rouping of statements
To)ens
Synta' used for macro definitions
19 W:+' #% ':! %&(>)/ =%!8 ') 7!$!,+'! =$#B=! /+>!/%;
X Sym"ol is used in macro definition to generate uni,ue sym"ols &ach macro e'pansion the X
sym"ol is replaced "y XII1 where II is the alpha numeric character
20 W:+' +,! H$)*$ +% $!%'!8 (+4,) 4+//; ?)* ':! $!%'!8 (+4,) 4+//% +,! !A!4='!8;
-N)30D!4 20091
Macro calls within another macro definition is called nested macro call In the nested macro call1
the call is done "y outer macro and the macro called is the inner macro
The e'ecution of nested macro call follows the %IFO rule In case of nested macro calls the
e'pansion of the latest macro call is completed first
21 M!$'#)$ ':! '+%H% #$3)/3!8 #$ (+4,) !A.+$%#)$
Identify the macro calls in the program
The /alues of formal parameters are identified
Maintain the /alues of e'pansion time /aria"les declared in a macro
&'pansion time control flow is organiRed
Determining the /alues of se,uencing sym"ols
&'pansion of a model statement is performed
22 ?)* ') 8!%#7$ ':! .+%% %',=4'=,! )" + (+4,) +%%!(>/!,;
To design the structure of macro-assem"ler1 the functions of macro preprocessor and the
con/entional assem"ler are merged #fter merging1 the functions are structured into passes of the
macro assem"ler
UNIT V TEXT EDITORS

1 D!"#$! #$'!,+4'#3! !8#'),;
#n interacti/e editor is a computer program that allows a user to create and re/ise a target
document The term document includes o"Jects such as computer programs1 te't1 e,uations1
ta"les1 diagrams1 line art1 and photographs any thing that one might find on a printed page
2 W:+' +,! ':! '+%H% .!,"),(!8 #$ ':! !8#'#$7 .,)4!%%; -N)30D!4 -200<12 -M+&0E=$! -20051
The following @ tas)s are performed in the editing process
0 Select the part of the target document to "e /iewed and manipulated
5 Determine how to format this /iew on-line and how to display it
4 Specify and e'ecute operations that modify the target document
@ +pdate the /iew appropriately
3 W:+' +,! ':! ':,!! 4+'!7),#!% )" !8#'),N% 8!3#4!%;
0 Te't de/ice/ String de/ices
5 !utton de/ice/Choice de/ices
- 15 -
4 %ocator de/ice
4 W:+' #% ':! "=$4'#)$ .!,"),(!8 #$ !8#'#$7 .:+%!;
In the actual editing phase1 the target document is created or altered with a set of operations such
as insert1 delete1 replace1 mo/e and copy
9 D!"#$! L)4+'), 8!3#4!;
%ocator de/ices are two-dimensional analog-to-digital con/erters that position a cursor sym"ol
on the screen "y o"ser/ing the userGs mo/ement of the de/ice The most common such de/ices
for editing applications are the mouse and the data ta"let
< W:+' #% ':! "=$4'#)$ .!,"),(!8 #$ 3)#4! #$.=' 8!3#4!;
Eoice-input de/ices1 which translate spo)en words to their te'tual e,ui/alents1 may pro/e to "e
the te't input de/ices of the future Eoice recogniRers are currently a/aila"le for command input
on some systems
5 W:+' +,! 4+//!8 ')H!$%;
The le'ical analyRer trac)s the source program one character at a time "y ma)ing the source
program into se,uence of atomic units is called to)ens
8 N+(! %)(! )" '&.#4+/ ')H!$%
Identifiers1 )eywords1 constants1 operators and punctuation sym"ols such as commas and
parentheses are typical to)ens
9 M!$'#)$ ':! (+#$ 8#%+83+$'+7! )" #$'!,.,!'!,
The main disad/antage of interpreter is that the e'ecution time of interpreted program is slower
than that of a corresponding compiled o"Ject program
10 W:+' #% (!+$' >& /!A!(!;
The character that forms a to)en is said to "e a le'eme
11 W:+' #% (!+$' >& 4)8! ).'#(#O+'#)$;
The code optimiRation is designed to impro/e the intermediate code1 which helps the o"Ject
program to run faster and ta)es less space
12 W:+' #% !,,), :+$8/!,;
The error handler is used to chec) if there is an error in the program If any error1 it should warn
the programmer "y instructions to proceed from phase to phase
13 ?)* ':! (+..#$7 )" 3#!* >=""!, ') + *#$8)* #% 8)$!; -M+&0E=$! -20051
The mapping of /iew "uffer to a window is done with two components They are
Eiewing component formulates as ideal /iew
Display component maps to the physical output de/ice
14 N+(! %)(! )" '!A' !8#'),%
%ine editors
Stream editors
- 16 -
Screen editors
Kord processors
Structure editors
19 W:+' "), 8!>=7 ()$#'),% +,! =%!8;
De"ug monitors are used in o"taining information for localiRation of errors
1< M!$'#)$ ':! "!+'=,!% )" *),8 .,)4!%%),%
Mo/ing te't from one place to another
Merging of te't
Searching
Kord replacement
15 W:+' +,! ':! .:+%!% #$ .!,"),(#$7 !8#'#$7 .,)4!%%;
a Tra/eling phase
" Filtering phase
c Formatting phase
d &diting phase
18 D!"#$! ',+3!/#$7 .:+%!
The phase specifies the region of interest Tra/eling is achie/ed using operations such as ne't
screen full1 "ottom1 and find pattern
19 W:+' #% !8#'#$7 .:+%!
In this phase1 the target document is altered with the set of operations such as insert1 delete1
replace1 mo/e and copy
20 W:+' #% F#/'!,#$7 .:+%!;
The selection of what is to "e /iewed and manipulated in gi/en "y filtering
21 D!"#$! =%!, #$'!,"+4!; -M+&0E=$! -200<1
+ser interface is one1 which allows the user to communicate with the system in order to perform
certain tas)s +ser interface is generally designed in a computer to ma)e it easier to use
22 D!"#$! #$.=' 8!3#4!;
Input de/ice is an electromechanical de/ice1 which accepts data from the outside world and
translates them into a form1 which the computer can interpret
23 D!"#$! )='.=' 8!3#4!%
Output de/ices are used "y the user to /iew the elements "eing edited and the results of the
editing operations
24 W:+' #% ':! .=,.)%! )" V)#4! I$.=' D!3#4!; -N)30D!4 -20051
Eoice input de/ice translate orally spo)en sentences into their te't e,ui/alents
29 W:+' +,! 3+,#)=% "=$4'#)$% )" + 8!>=77!,; -M+&0E=$! -200<12 -N)30D!4 -20081
!rea) points
- 17 -
*aits
Tracing
Trace "ac)
2< W:+' +,! ':! (!':)8% #$ I$'!,+4'#)$ /+$7=+7! )" + '!A' !8#'),;
a Typing -oriented or te't command oriented method
" Function )ey interfaces
c menu oriented method
25 D!"#$! #$'!,+4'#3! 8!>=77#$7 %&%'!(%
#n interacti/e de"ugging system pro/ides programmers with facilities that aid in the testing and
de"ugging of programs
0 De"ugging functions and capa"ilities
5 (elationship with other parts of the system
4 +ser interface criteria
28 W:+' 8) &)= (!+$ >& ',+4#$7; -N)30D!4 -200<1
Tracing is a function pro/ided "y a de"ugging system that can "e used to trac) the flow of
e'ecution logic and modification The control flow can "e traced at different le/els of details1
procedure1 "ranch1 indi/idual instructions and so on
29 D!"#$! !8#'), %',=4'=,!
The command language processor accepts input from the users input de/ices and analyRes the
to)ens and syntactic structure of the commands
30 6#3! ':! 4)(.)$!$'% )" !8#'), %',=4'=,!
There are @ components of editor structure
a &diting component
" Tra/eling component
c Eiewing component
d Display component
31 W:+' +,! ':! >+%#4 '&.!% )" 4)(.='#$7 !$3#,)$(!$'% =%!8 #$ !8#'),P% "=$4'#)$%;
&ditorGs function in three "asic types of computing en/ironments
i Time sharing
ii Stand-alone
iii Distri"uted

PART -B
UNIT 1
1 EA./+#$ ':! +,4:#'!4'=,! )" SIC (+4:#$!
Draw neatly the !loc) diagram
&'plain each "loc) separately
2 EA./+#$ ':! +,4:#'!4'=,! )" SIC0XE (+4:#$!
Draw neatly the !loc) diagram
- 18 -
&'plain each "loc) separately
3 M!$'#)$ ':! 8#""!,!$4!% >!'*!!$ SIC +$8 SIC0XE
UNIT-II
1 EA./+#$ #$ 8!'+#/ +>)=' >+%#4 +%%!(>/!, "=$4'#)$%
Y # simple SIC assem"ler
Y #ssem"ler #lgorithm
Y Data structures
2 EA./+#$ +>)=' ':! (+4:#$!-D!.!$8!$' A%%!(>/!, "!+'=,!%
Y Instruction formats
Y #ddressing modes
Y $rogram (elocation
3 D#%4=%% #$ 8!'+#/ +>)=' ':! (+4:#$!-I$8!.!$8!$' A%%!(>/!, "!+'=,!%
Y %iterals
Y Sym"ol-Defining Statements
Y &'pressions
Y $rogram "loc)s
Y Control sections and $rogram %in)ing
4 EA./+#$ #$ 8!'+#/ +>)=' ':! +%%!(>/!, D!%#7$ ).'#)$%
Y One-pass #ssem"ler
Y Multi-pass #ssem"ler
9 D#%4=%% #$ 8!'+#/ +>)=' MASM A%%!(>/!,
Y Classes
Y Data Segments
Y .ear Jump
Y Far Jump pro"lem
- 19 -
Y Segments
Y M#SM directi/es
UNIT-III
1 EA./+#$ #$ 8!'+#/ +>)=' >+%#4 /)+8!, "=$4'#)$%
Y Design of an #"solute %oader
Y # simple !ootstrap loader
2 EA./+#$ +>)=' M+4:#$!-D!.!$8!$' L)+8!, F!+'=,!%
Y (elocation
Y $rogram %in)ing
Y #lgorithm
Y Data structures
3 D#%4=%% #$ 8!'+#/ +>)=' M+4:#$!-#$8!.!$8!$' L)+8!, "!+'=,!%
Y #utomatic %i"rary Search
Y %oader Options
4 EA./+#$ +>)=' ':! L)+8!, D!%#7$ O.'#)$%
Y %in)age &ditor
Y Dynamic lin)ing
Y !ootstrap loaders
9 EA./+#$ #$ 8!'+#/ +>)=' MS-DOS L#$H!,
Y MS-DOS #ssem"lers and Compilers
Y MS-DOS %I.-
Y MS-DOS O"Ject modules
UNIT-IV
1 EA./#+$ #$ 8!'+#/ +>)=' ':! >+%#4 M+4,) P,)4!%%), "=$4'#)$%
2
Y Macro Definition
Y Macro e'pansion
Y #lgorithm
Y Data Structures
2 D#%4=%% #$ 8!'+#/ +>)=' ':! M+4:#$!-#$8!.!$8!$' (+4,) .,)4!%%), "!+'=,!%
Y Concatenation of Macro parameters
Y *eneration of uni,ue la"els
Y conditional macro &'pansion
Y -eyword macro parameters
3EA./+#$ +>)=' M+4,) P,)4!%%), D!%#7$ ).'#)$%
Y (ecursi/e Macro &'pansion
Y *eneral purpose Macro $rocesors
- 20 -
Y Macroprocessing within %anguage Translators
4 EA./+#$ #$ 8!'+#/ +>)=' MASM M+4,) P,)4!%%),
Y Conditional assem"ly statements
Y M#SM macro
Y Conditional statements
9 EA./+#$ #$ 8!'+#/ +>)=' ANSI C (+4,) L+$7=+7!
Y Macro definitions with parenthesis
Y Macro e'pansion with parenthesis
Y Conditional compilation statements
Y De"ugging statements
UNIT-V
1 EA./+#$ #$ 8!'+#/ +>)=' ':! ")//)*#$7
i) &diting process
ii) +ser Interface
&diting process;
Tas)s
Y Select the part of the target document
Y Determine how to format
Y Specify and e'ecute operations
Y +pdate
+I-Conceptual model
Y Operations on num"ered se,uence
Y Manipulate portions of the plane
Y Concerned i/p de/ices
2 EA./+#$ +>)=' ':! !8#'), %',=4'=,!
Diagram
&'planation
3 D#%4=%% #$ 8!'+#/ +>)=' 8!>=77#$7 "=$4'#)$% +$8 4+.+>#/#'#!%
Different le/els
Y $rocedure
Y !ranch
Y Indi/idual Instructions
Y &'amples
4 EA./+#$ #$ 8!'+#/ +>)=' ':! ")//)*#$7
i)(elationships with other parts of the system
ii)+ser Interface criteria
i(e,uirement-#lways "e a/aila"le
Y De"ugging
Y #pplication de/elopment time
Y $roduction en/ironment
Y Coordinate with e'isting and future language compilers and interpreters
- 21 -
ii simple organiRation
Y full screen displays and windowing systems
Y command language should "e clear
Y On-line help facility
9 EA./+#$ +>)=' 3+,#)=% %)"'*+,! '))/%
Y Te't editors
Y De"ugging system
G=!%'#)$ B+$H
U$#' Q I
PART Q A
0 Define System Software
5 Define data Format
4 Khat is instruction setZ
@ Khat is direct addressing mode and indirect addressing modeZ
> Differentiate "etween #ssem"ler and Interpreter
7 Khat is little &ndian and !ig &ndian "yte orderingZ
< Khat is the purpose of register in a systemZ
- 22 -
= %ist the types of registers used in a system
? Khat is the siRe of the memory in a SIC and SIC/I& machinesZ
06 Khat are the instruction formats of SIC/SCZ
00 Khat are the types of addressing modes in SIC and SIC/I& machinesZ
05 8ow input and Output operations are performed in $ower$C architectureZ
04 Khat the types of I/O instructions a/aila"le are in SIC machinesZ
0@ Khat is Format4 and Format @ instructions in SIC/I& machineZ
0> Define the "ase relati/e and program counter relati/e addressing mode of SIC/I&
machine
07 %ist the units of Ean .ewman architecture
0< Illustrate how input and output operations are performed in SIC
0= *i/e the instruction format of SIC/I& machine
0? Following is a memory configuration
#ddress /alue (egister (
0 > >
> <
7 >
< <
Khat is the result of the following statementZ
56 Krite down the name and use of I and % registers in SIC machine architecture
50 Khat is #rithmetic and floating unit point unit in architectureZ
55 Define Te't editor
54 &'plain how memory is organiRed in SIC machine architecture
5@ Khat are the registers in SIC machineZ
5> Khat is the data format adapted in SIC machineZ
57 Khat are the additional registers used "y SIC/I& machine and what are their usZ
5< Khat is the format of floating point data used in SIC/I& machine
5= Khat are the instructions a/aila"le in SIC machineZ
5? Khat are the /arious load and store instructions a/aila"le in SIC machineZ
46 Khat are the /arious integer arithmetic instructions a/aila"le in SIC machineZ
40 Khat is the use of COM$ instructionZ
45 Khat are the su"routine lin)age instructions a/aila"le in SICZ
44 Khat are the /arious load and store instructions a/aila"le in SIC/I& machineZ
4@ Khat are the /arious floating point arithmetic instructions a/aila"le in SIC /I& machineZ
4> Khat are the /arious register-to-register arithmetic instructions a/aila"le in SIC /I&
machineZ
47 8ow is a communication with OS is esta"lished in SIC/I& while e'ecuting a programZ
4< Krite a sample program segment to indicate the arithmetic operation for the SIC
machine
4= Define simple addressing
4? Khat is Super/isor callZ
@6 Khat is Condition codeZ
P+,' Q B
0 %ist the salient features of hypothetical machine
5 Discuss a"out SIC architecture
4 Discuss a"out SIC/I& architecture
- 23 -
@ The /aria"le E01 E5 and E4 are assumed as an array of 066 words each Krite a se,uence
of instruction for SIC to add together the corresponding elements of E01 E5 and store in
E4
> Compare and Contrast SIC1 SIC/I& with programming e'amples Krite the se,uence of
instruction for SIC to set
E#%0 B E#%5 A I.C( - 5
E#%4 B E#%@ A I.C( [ 5
Illustrate how the same calculation could "e performed on SIC/I&
U$#'-II
PART-A
0 Define #ssem"ler
5 Khat are #ssem"ler directi/es or pseudo-instructionsZ
4 *i/e some e'amples for assem"ler directi/es
@ Khat are functions re,uired in translation of source program to o"Ject code
> Khat is forward referenceZ
7 Khat are the tree types of records in a simple o"Ject program formatZ
< Khat are the information present in a 8eader record or *i/e the format of header recordZ
= Khat are the information present in a Te't recordZ
? Khat are the information present in a &nd recordZ
06 Khat are the information present in a Modification recordZ
00 Khat are the information present in a Define recordZ
05 Khat are the information present in a (efer recordZ
04 Khat are functions performed in $ass 0 "y a two pass assem"lerZ
0@ Khat are functions performed in $ass 5 "y a two pass assem"lerZ
0> .ame the data structures used "y an assem"ler
07 Khat is O$T#!Z
0< Khat is SQMT#!Z
0= Khat is %OCCT(Z
0? Khat is the information present in intermediate fileZ
56 Krite down the pass num"er($#SS0/$#SS 5) of the following acti/ities that occur in a
two-pass assem"ler
50 Khat is multiprogrammingZ
55 .ame the addressing modes used for assem"ling register-to-memory instructionsZ
54 Khat is the use of !#S& and .O!#S&Z
5@ Khat is (egister to memory instructionsZ
5> Khat is (egister to register instructionsZ
57 Khat is the ad/antage of register-to-register instructionsZ
5< Khat is a relocata"le programZ
5= Khat is relocationZ
5? .ame the two methods of performing relocationZ
46 Khat is the use of modification recordZ
40 Khat are the machine independent assem"ler featuresZ
45 Khat is literalZ
44 Khat is a literal poolZ
4@ Khat does an assem"ler perform when it encounters %TO(* assem"ler directi/eZ
4> Krite a program to load the program counter address into the "ase register using literal
- 24 -
47 Khat is %ITT#! or Khat is "asic data structure needed to handle literalZ
4< .ame the sym"ol defining statements
4= Khat is the use of the sym"ol defining statement &S+Z
4? Khat is the use of the sym"ol defining statement O(*Z
@6 Khat are the two types of e'pressionZ
@0 Khat is relati/e e'pressionZ
@5 Khat is a"solute e'pressionZ
@4 %ist the types of #ssem"lers
@@ 8ow assem"lers handle forward reference instructionsZ
@> %ist the types of one pass #ssem"lers
@7 Khat is load-and-go assem"lerZ
@< Khat is multi-pass assem"lerZ
@= Khat is M#SM assem"lerZ
@? Khat is near Jump and far JumpZ
>6 Khat are the functions of assem"ler
PART-B
0 &'plain the data structure used in the design of assem"ler
5 &'plain the algorithm for pass0: pass 5 of an assem"ler
4 &'plain the machine independent features of an assem"ler
@ &'plain the machine dependent features of an assem"ler
> &'plain the different instruction formats1 sets : addressing modes used in the assem"ler
7 &'plain the design of one pass assem"ler
< &'plain the design of multi pass assem"ler
= Discuss a"out M#SM assem"ler
? Khat is the need of program "loc) &'plain the program "loc) in detailZ
06 Krite notes on control section and program %in)ing
UNIT-III
PART-A
0 Khat is a loader or a"solute loaderZ
5 Khat is a "ootstrap loaderZ
4 Krite the algorithm for an a"solute loader
@ Khat are the functions of an a"solute loaderZ
> Khat are the disad/antages of an a"solute loader or machine dependent loaderZ
7 Khat is a relocating or relati/e loaderZ
< Khat is a "it mas)Z
= Khat is the purpose of the relocation "it in o"Ject code of relocation loader or what is a
relocation "itZ
? Define %in)er
06 Define %in)ing
00 Khat is control sectionZ
05 Khat is e'ternal referenceZ
04 Define &'ternal sym"ol
0@ Khat is &ITD&FZ
- 25 -
0> Khat is &IT(&FZ
07 Khat are data structures needed for lin)ing loaderZ
0< Khat is the use &ST#!Z
0= Khat is reference num"er mechanismZ
0? Khat is the ad/antage of reference num"er mechanismZ
56 Khat is a load mapZ
50 Khat is automatic li"rary call or li"rary searchZ
55 Mention the usage of the directory "y a loaderZ
54 Khat are the functions of $ass 0 and $ass 5 of an MS-Dos lin)erZ
PART- B
0 Discuss "riefly a"out a"solute loader
5 Discuss a"out !ootstrap %oader
4 &'plain #utomatic %i"rary Search
@ Discuss a"out %in)age editor
> Discuss a"out Dynamic %in)ing
7 Discuss a"out relocata"le loader
< *i/e the algorithm for pass 0 and pass 5 of a loader
= Discuss machine independent loader features
? Discuss machine dependent loader features
06 &'plain a"out MS-DOS %in)er
UNIT-IV
PART-A
0 Khat is a macro instructionZ
5 Khat is a macroZ
4 Khat are the acti/ities of the macro processingZ
@ 8ow does the macro processor help the programmerZ
> Khat are the two main assem"ler directi/es use with macro definitionsZ
7 Khat is the logic "ehind the two-pass macro processorZ
< Khat is the restriction imposed on a two-pass macro assem"lerZ
= Khat are the three main data structures in/ol/ed in a macro processorZ
? Khat does the macro definition ta"le containZ
06 Khat is the purpose of the #(*T#!Z
00 8ow are the am"iguities in parameters a/oided in macro processorZ
05 &'pand the following
S+M M#C(O :ID
%D# I:ID-\0
#DD I:ID-\5
#DD I:ID-\4
ST# I:ID-\>
M&.D
S+M #
04 Khat is meant "y conditional macro e'pansionZ
0@ Define positional parameters
0> Draw the structure of the #(*T#!
- 26 -
07 Khat should "e done for recursi/e macro e'pansion if the chosen programming language
does not support recursionZ
0< Khat is a general purpose macro processorZ
0= Khat are the ad/antages of a general purpose macro processorZ
0? Khat are the disad/antages of a general purpose macro processorZ
56 Khat is a pre-$rocessorZ
50 Khat is a line-"y-line macro processorZ
55 Khat are the ad/antages of line-"y-line macro processorZ
54 8ow are the macro definitions and e'pansions handled in #.SI C languagesZ
5@ *i/e any two e'amples of macro definitions in #.SI C
5> In the following macro definition1
Hdefine #!SDIFF(I1Q)C(I)\(Q)Z(I)-(Q) ; (Q)-(I)D
*i/e the e'pansion for #!SDIFF (IA01J->)
57 &'plain how macro e'pansions are controlled in &%&.# macro processor
5< For the following macro definitions
Hdefine DIS$%#Q (&I$() printf(H&I$( 2BVdWn31&I$()
*i/e the e'pansion for the macro in/ocation DIS$%#Q (IA9A0)
5= Can there "e nested macros in #.SI CZ *i/e an e'ample
5? *i/e an e'ample for conditional compilation in #.SI C
46 Define macro
40 Khat is meant "y concatenation of macro parameterZ
45 Khat is meant "y macro time /aria"leZ
44 Khat is conditional macro e'pansionZ
4@ State how positional parameters and arguments are related in a macro processorZ
4> Khat is meant "y e'panding the macroZ
47 *i/e an e'ample for a simple macro-time conditional structure
4< *i/e two e'amples of macro definition
4= Khat is meant "y line-"y-line macro processorZ
4? Khat are the data structures used in a macro processorZ
@6 %ist the difference "etween SIC Macro $rocessor and M#SM Macro $rocessor
PART Q B
0 Krite the algorithm for one pass Macro processor
5 Krite the machine independent features macro processor
4 Krite a"out recursi/e macro e'pansion
@ Discuss a"out M#SM macro processor
> Discuss a"out #.SI C %anguage
7 Discuss a"out conditional Macro
< Khat is the need for concatenation of macro parametersZ &'plain how it is done
= &'plain "riefly a"out Macro e'pansion
UNIT QV
PART-A
0 Khat is an interacti/e editorZ
5 Khat is a documentZ
- 27 -
4 Khat are the four tas)s related to document editingZ
@ Khat is meant "y filteringZ
> Define formatting the document
7 Khat is editingZ
< Khat are the elements on which editing is doneZ
= Khat does the conceptual model of the editing system representZ
? Khat are the two fundamental types of editorsZ
06 Khat is a data ta"letZ
00 Khat is the oldest editor interface usedZ
05 8ow is the typing of commands made easy with editorsZ
04 Khat are the semantic routines that encompass the editor structureZ
0@ 8ow is the editing area selected in an editorZ
0> Can the current editing pointer alteredZ
07 Khat is the function of the tra/eling componentZ
0< Khat is the name of the filter in/o)ed when the edit command is issuedZ
0= Khat is the purpose of the editing filterZ
0? 8ow is the starting point of the editing area selected for /iewingZ
56 Draw the relationship "etween the /iewing and editing "uffer
50 8ow doest the editor wor) with a non intelligent terminalZ
55 8ow does the editor wor) with an intelligent wor)stationZ
54 Khat is the disad/antage of editing in a non-intelligent terminalZ
5@ Khat are the facilities pro/ided "y an interacti/e de"ugging systemZ
5> Khat are the re,uirements of an interacti/e de"ugging systemZ
57 Khat is meant "y e'ecution se,uencingZ
5< Khat is a "rea) pointZ
5= Khat is the status of the program e'ecution once "rea) point is reachedZ
5? Khat is meant "y tracingZ
46 Khat is meant "y trace "ac)Z
40 .ame some optimiRation followed in an editor/
45 8ow does the code rearrangement affect the de"uggerZ
44 Khat is the important re,uirement of an interacti/e de"uggerZ
4@ Khat are the other parts of the system to which the de"ugger should "e related withZ
4> Khat are the desired features of the user interfaceZ
47 Khat is the re,uired feature of command formats in a user interfaceZ
4< Khat is the desired feature of the command language in a user interfaceZ
4= 8ow is the assistance pro/ided for user interfaceZ
4? Khat is the needed feature of menus in a user interfaceZ
@6 Khat are tas)s of document editing processZ
@0 Khat is the function of command language processorZ
@5 Khat is a te't or string de/iceZ
@4 Khat are locator de/icesZ
@@ Khat are /oice-input de/icesZ
@> Khat is an interacti/e de"ugging system or de"ugging systemZ
@7 Khat is e'ecution se,uencingZ
@< Khat is tracingZ
@= Khat is trace "ac)Z
- 28 -
PART QB
0 Kith a neat "loc) diagram1 e'plain a"out the editors
5 Discuss a"out Interacti/e De"ugging Systems
4 &'plain the /arious types of user interface
@ 8ow are user interface usefulZ &'plain
> Discuss clearly the design of the Functional component of a te't editor
- 29 -

Potrebbero piacerti anche