0 ratings0% found this document useful (0 votes) 98 views14 pagesSpos Model Answer 2018
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Total No. of Questions: 6) TNSem -MAR-18 spay no. /
P53 {Total No. of Pages :2
APR - 18/TE/Insem. - 141
T.E. (Computer Engineering)
SYSTEMS PROGRAMMINGAND OPERATING SYSTEM
(2015 Course) (Semester - I) (310251)
Time : 1 Hour] (Max, Marks :30
Instructions to the candidates:
1) Answer Qi or Q2, O5 or O4, OS or 06.
2) Neat diagrams must be drawn wherever necessary.
3) Figures to the right indicate full marks.
4) Assume suitable data, if necessary,
Q).y) Differentiate between literal and immediate operand. How assembler
handles them? Give examples. _ [6
wb) Define Assembler Directive. Explain ORGIN, EQU & LTORG with
example, IA)
OR
Q2) a) Consider following Assembly code and show output of pass-l of two
pass assembler with entries in MOT, POT, ST, LT and BT (5)
PROG START 50
USING PROG-2. i5
L1, FIVE
Ad, =
LTORG
ST 1, RES
FIVE DC F 4"
RES DS IF
END
5b) Discuss with example what is forward reference? How is it handled is
single pass assembler? 15I
PLO.93).3)
04).2)
b)
ww
Q5).p)
>)
Q6) a)
wb)
w)
Define Macro. What are the advantages of macro facility? How are macros
different from functions? 16)
What is the need of DLL? Differentiate between How Dynamic and static
linking? [4
OR
What are the types of ioaders? Explain compile and go loader scheme
with advantages and disadvantages using suitable diagram, [6]
Comment on the statement “Programs with macros require more space
and less time at runtime than programs with functions”. 12)
Discuss four different functions of loader, (2)
What is interpreter? Explain various components of interpreter? [4]
Consider input “d= a+ b * 2;° and show the output of each phase of
compiler with suitable diagram? (6)
OR
Write regular expressions to recognize following, 4]
8) Signed and unsigned integer numbers.
ii) Identifiers.
iii) Few Keyword in “C™ program.
iv) Relational Operators.
What is LEX? Explain working of LEX with suitable diagram? [4
What is Syntax Error? Give suitable example? 2)
+44
*@
TE/Insem, - 141 :Walesa ankortlank at assembled ida park 4 the |
Some other mem. location - mic _inshuchan -
___| 2-| Examples Mover 8 ,°25° | 2-lEeamge: Move Alas |
wijinage_ot i i Afbh) Define Assembler Divechve - fxplain OR1GIN ,LQU $170RG
with _ example 2 Log— Mavic
se. - Assemblew Divedives ave dae iacha? hat gives tae
performed - igi) 4 va 4 Melo)
ae ORIGIN =
a fog ane lar Eemniel
a ORIGIN 200
a) 1ToRGEA Tate gaye aeitipait)
=Lakt i en ala pares sy hee
= = Syntax do 2
| symbol FQ FiP.4 Looder 2
1) Dilocabicn = assign space ji aan memeny fi the poy
o> inking = -Loking. 9 elkeoe_modale with e005. Ofer
8) Relocah = Adjust all addven dependant locahans _,.such ag
addyen constants fo Correspend tp the allocaled Spee
Iran calted velocaban -
© loading ~ physically leading tne male tosh? Sdala Infy
ss foa-mana)
Sa
fat i.
[eo “ebspss cess be
deneral y oad er. g hor es sb & ——Q:b- a) whol io _Takeepreer 2 fxplain “Various Component [Link]?
_— >" Thlapreta vin_a_pogram [tool that which reads the source .
ede ome _inshucion oy line ot atime, Convert this tine.
i jot machine code. oy Some inleamediate form § etecute it
$ Component 4 Shlerpretee = for-oavey]
___}) Assembler 3) Linke S) Debugger
_ pre procenney » {oa:maye)
- 1) Assembler? iso program which tonvetb Assembly lang a
ints machine _Jevel_tanguage Code)
%) Loadey ~ it loads the prog: jnto main memany foc __
the execution -
3) Linkey — He treet: mail geeg ieee Mie ta
nde td wed tn Heknag ba program, Ne te Wine,
Q-5 6) Consider input “d= atb#2;" and shad the oP g.
: : ; F >
ai e \ z eS
—— })_fevical_Anolysis 4 wn oly M4 A
d= ath * 2 j _(o4-more]
id4.s ide 4 ids e2y
ib sean the pom fel te yght 4 generates fren
2) Syniax Analysts (04- mavie]
: —
144 ia +
==
if checks the Suntan prog -
‘id— ei \ runt Lot-mavie)
t wig aN "
| - vai rm
jo 4
ie ink ty float
Tt _perfoym type checicing 4 Lonvevstcn-
9. Serie Code omnageen 12 fotemave)-
“tte = Infneal @
you pas S oddg eet nnd
bas \dz4d2 eib
late 2 <
_3)__ Code cpa Ea Lot- mark)
ve Waa 2-0
jd = ldo tte
y
©) Code Generator + Lo s-mave)
MOVE Ri vids
A pape Ry HOO! 18 uu
mavf_-R2\ld2
“ADF 21, Ro
mor idt Rt
aA_ Oe. 8) What \s+Synlix Erv? Gye Suitable Example |Od-mavss)
_ ——> © suntan error ua aed checks the Syntan pan gran
thethes ida _popaty defined _or nol [o2-mavin)
= TRis_apa dont_in 2 shane gq ele is: «on ols
' = Th da_alyd called on Syntuy free.
= Br Galen vaviowy per q ewer.
eq: \valuc prvalue not declad ,
SS emmicnton nh deAned yg
e-g:
Ks 442 * BO
7 Sam\-céJon missing error *
Ge Washed Ie UD Fekin ing 9 i Sie —
Sample 9 [o4-mavt)
5 hc ins ecinall Nndludee agegoberotnal' antic tied 7
4o_Stan_the program fore let to oaighk.§ seperate + out
the token: 4a_gunerak_pawe_iree” Los-mavial-
> bex Jn _eho foo) which takes i/P ag regular gee eeyure:
Joans ja ay Pade. 2 g-out ce
i PyYone > ‘ 3 ye ab Sante 4
User funchion
6.6 6) wie ela exprnin rug Plloaing =.
) Signed _§ Unsigned Snkeger number i
yh denhher
3) Fea keyed inc" prof.
4) Relate) Opevator (04-mavier |
==h Ths lek q_ shiny « parr finite ‘ston 1's Faaon to regular long
RE 2 1,243.4 — RE. -1,-2,°3
= 2 (oxzmavi)
1) pe = Ua tyidreid3s = a
ait teks [o4- ravi]
3) RE = (forsaabiley Do) ;
“ay {ot-mava)
4) RE = tra 4 f= ede ae
{ot maw] «
—Theny of Com peat ang