system software

5
USN 10cs52 # System Software fut -'- **& '.dlinre: 3 hrs. Max. Marksr$bd qgdo.J d rr ^1^. ,a Drr/D t--r, ---^-ai^-^^ ^^t^^a: \ *r{#* Note: Answer FIVEfull questions, selecting ffi ' .ff at least TWO questionsfrom each parl *. * W I rt J*" 4 E\*p^um\ .) { # {&k E 'WpM-" pART - A m*""# Ela.Effilyrreinstructionformats*auf,ffi-desofSICD(E.*w*(,oMarks) : t a. L2\Pryn1##,Lte urDlILrvLILrIl ILrIllIllL) aallu auulsJsur$ TITU(I(JS Ul 'JI\-/A-D. fu * (rU lYrArKS, ; b. Writd@QSram in.both SIC and SIC/XE to copy a character strigu.system software' to anotherffiry.ter string *(\* (r0Marks) g -^%'' 'ffiY e? u, -'#Y ,ry\ W $= 2 a. Explain the difdruptures and pass-l algorithm of SIC arsql#r. (10 Marks) $'E b. Generate the syrnbffiSable and write the object programffitfu fonowing SIC/XE progr{}m: E t b. Generate the symbffSable and write the object programffiotlie following SIC/XE program: iiven that: LDX ;Wp,on : 00, LDB : 68, ADpr: Td'fX = 2C, JLT : 38, STA : 0C. .__o H (( i.+ RSUB :4c). %" W ,= c\ SUMdq\ START ffi 0 E ; ;irftT*** ior*t'- ,4 #o €E /.&DAd$. #o c'Q **I-*nB #TABLE2 o; .E a TABLE2 A E LOOP y\,sDry \ TABLE, X 5 r *KIADD *#. tagLE2,X E A ".& " Trx *" / gouNT $E -#* rr,r - *frop ; .! *4#* +SrA ToffiS$. flhp- RSUB oH ** ;B *s*ry4ourr RESw 1 ffij-l Es pqpp;;;;; ;;;-r ---, *gadu q- *ffiTABLE RESW 2000 -{ffi =cc + E. ffi TABLE2 RESW 2ooo 4t*&4"" tra. ^ .o JCdtr **#* ? * ,,ffip LF'iJLLZ r(|,sw tuuu - .o Kh,LI TOTAL RESW 1 W*\ i r.S.'\u* r \-/ l. ..1L l\I;J vY I \ ff .,S -6 END FIRST o'p (to Marks) tg "rW '%P EE - - 'fu,:!ffd , 1 nF r i.r. rr -;*d3 & \.*s E 'E q"{Fl* Er\L' rlKS I f*,$ (ru Marks) te "rWo %" ffi I E 3 a. *ffiare control sections? Explain how linking is performed between contr$$tections. i€ *LB" .. "--*'#oMarks) .9 [ " ffi -Explain how multipass assembler handles the following forward reference: do . 6 = \ 1 HALFSZ Eeu MAxLEN/2 ' ism * ;- R ""'qq A: ,,4U, fi E .%h3- . 2 MAXLEN EQU BUFFEND-BUFFER w _* E q"h# 3 PREVBT EQU BUFFER-I '[4d'&- 4 BUFFER RESB 4096 -1:{ -.: <*i 'l I''L,I I 'UI\ 't\ljoL' 't\''7\-, s ij 5 BUFFEND EQU '< 2 Assume that, when assembler goes to hne 4,location counter contains 1034(Hex). (10 Marks) 6 ii 3 4 a. With source code, explain the working of boot-strap loader. (10 Marks) b. Explain machine dependent features of loader. (10 Marks) I of2

Upload: mobiless

Post on 07-Aug-2015

22 views

Category:

Technology


2 download

TRANSCRIPT

USN 10cs52

# System Softwarefut -'- **&

'.dlinre: 3 hrs. Max. Marksr$bdqgdo.J d rr ^1^. ,a Drr/D t--r, ---^-ai^-^^ ^^t^^a: \*r{#* Note: Answer FIVEfull questions, selecting ffi' .ff at least TWO questionsfrom each parl *. * WI rt J*" 4E\*p^um\.) { # {&k

E 'WpM-" pART - A m*""#Ela.Effilyrreinstructionformats*auf,ffi-desofSICD(E.*w*(,oMarks): t a. L2\Pryn1##,Lte urDlILrvLILrIl ILrIllIllL) aallu auulsJsur$ TITU(I(JS Ul 'JI\-/A-D. fu

* (rU lYrArKS,

; b. Writd@QSram in.both SIC and SIC/XE to copy a character strigu.system software' to€ anotherffiry.ter string *(\* (r0Marks)g -^%''

'ffiYe? u, -'#Y ,ry\ W

$= 2 a. Explain the difdruptures and pass-l algorithm of SIC arsql#r. (10 Marks)

$'E b. Generate the syrnbffiSable and write the object programffitfu fonowing SIC/XE progr{}m:E t b. Generate the symbffSable and write the object programffiotlie following SIC/XE program:iiven that: LDX ;Wp,on : 00, LDB : 68, ADpr: Td'fX = 2C, JLT : 38, STA : 0C..__o H ((

i.+ RSUB :4c). %" W,= c\ SUMdq\ START ffi 0

E ; ;irftT*** ior*t'- ,4 #o

€E /.&DAd$. #oc'Q **I-*nB #TABLE2o;.E a TABLE2

A E LOOP y\,sDry \ TABLE, X5 r *KIADD *#. tagLE2,XE A ".& " Trx *" / gouNT$E -#* rr,r - *frop; .! *4#* +SrA ToffiS$.

€ € flhp- RSUB oH **;B *s*ry4ourr RESw 1 ffij-lEs pqpp;;;;; ;;;-r ---, *gaduq- *ffiTABLE RESW 2000 -{ffi=cc+ E. ffi TABLE2 RESW 2ooo 4t*&4""tra.^ .o JCdtr **#*? * ,,ffip LF'iJLLZ r(|,sw tuuu- .o Kh,LI TOTAL RESW 1 W*\i r.S.'\u* r \-/ l. ..1L l\I;J vY I \ ff .,S

-6 € END FIRST o'p (to Marks)tg "rW '%PEE - - 'fu,:!ffd , 1 nF r i.r. rr -;*d3

&\.*s

E 'E q"{Fl* Er\L' rlKS I f*,$ (ru Marks)te "rWo %"

ffiI E 3 a. *ffiare control sections? Explain how linking is performed between contr$$tections.

i€ *LB" .. "--*'#oMarks).9 [ " ffi

-Explain how multipass assembler handles the following forward reference: do .

6 = \ 1 HALFSZ Eeu MAxLEN/2 ' ism *;- R ""'qqA: ,,4U,

fi E .%h3- . 2 MAXLEN EQU BUFFEND-BUFFER w _*

E q"h# 3 PREVBT EQU BUFFER-I'[4d'&- 4 BUFFER RESB 4096 -1:{-.: <*i 'l I''L,I I 'UI\ 't\ljoL' 't\''7\-, s

ij 5 BUFFEND EQU '<2 Assume that, when assembler goes to hne 4,location counter contains 1034(Hex). (10 Marks)

6ii

3 4 a. With source code, explain the working of boot-strap loader. (10 Marks)b. Explain machine dependent features of loader. (10 Marks)

I of2

10css2

PART _ B5 a. Explain the overview of editing pro.F--i, b. E1-i,r4 editor structure with a diagram. jll Y:::lrbi** * "' Explain the tunctions and ;;odilcapabilities of interactive debugging system. [3:ffiffi*#p, Qe Q -J ---""'""'%-d:-'

n'{i " "#-u *

6 *d6l*-rExplain the data structures used in macro processor with example. *. WL"ruub5.'Bxplain machine independent features of macro processor. zu * (r2 Marks)*-'t/q".""#: _ d6 /'f.:**up

M7 a' wrr"t@*rx an!-vac!? Explain the different sections of LEX wlt{Wample. (10 Marks)b' what are'iefohr expressions? bxphin the characte"r-sffi; #s;S$'.##Ar;'.]j'nr.'@* _ffp (loMarks), ..,Yflk &^Wo

*8 a. what is shift/redffiarsing? Explain the parsing orilr.ffiT.fi ed= 12+ 13,,and represent

using parse tree. *ffr* W\ ^ n nr--,-^\. a*.& ,,o, w (10 Marks)b. |:tff j,T T_bj.s"ity

inrari,thmetic expressto,r. what is the ambiguity in parsing 2 + 3 x 4?Explain the solution for it. 16."g r,* '::';ki- ' ---Q----J L J /\ a i

't;"fu* .*., \ (l0Marks)Jfl;st r L

i4\. , .

vPqtx*"s&\-*,1* f4* u

.*rr \t" \*dr.p d\

*od**"\"' *

-;h'f "fr " dflt ..W*,!tr *"6s

"-q h"q \ d- \\q, $fl rl*+ qo' s \d$JNe \":' "'"I

*;ul d-T${ 3" # $,k I ss'.d##"3 *'-;*

"*\"* d;^q

"-q&"' ffi"'i*#$*' @er\ e"WphWld"' 6 1h." WkW" w

df - dl"p*."\' td e^.

" \"-] * s.sU** k# -v'*"'.d"fu 1 .iq-,^,,

fu" ""ii'* **,trtK i

##"

2 of2

USN 10cs52

Max. Marks:100

Fifth Semester B.E.

L Time: 3 hrs.

C)oo

4)

{)L

4a

!,):e

-ro ll

coo.=Ncd*ilbotooCeO

=e

8sdX

oOdoOEb0c.8(B'o>#266r

-? o)

5ro.Ao.''t -:

o

A';LO .=

-;otrbo

'-C6=o. bitr>=o5*:

J t'iC)

oZ

oo.

atlesst TWO questions from each purt.

" ,l;rt.n. .

'ART - A ';;,,,,.

'

I a. Bring olfthe difference between system software and application software. (06 Marks)b. With reSp Iq Pentium pro architecture, explain the following :

i) Instruction format ii) Data format iii) Registers iv) addiessing mode. (10 Marks)c. Write sequenie of instruction for SIC to clear 20 by'tes strings to all blanks. (04 Marks)

2 a. Write the fundamental functions of assembler. (05 Marks)b. Define assembler directive. F.xplain the different ty$$sof directives used in SIC machine.

""'r{|,1, ,:,:,:: (07 Marks)c. Write and explain the algoritllm of PASS - 1 of two - pass assembler. (08 Marks)

, ::,,,,, l, ; ""

3 a. Distinguish between literal and irnmediate operands. How does the assembler handle theliteral operands? (07 Marks)

b. What is a program block? How do€Sfu,,asSembler handle the program blocks? (10 Marks)c. What is the need of pass - 2 ulg5-rifi\nsZ Gin3 gNample. (03 Marks)

4 a. Write a bootstrap loader alg#iftm. Explain it. (08 Marks)b. Illustrate linking and relocation with sample programs. (t2 Marks)

*;":' .. PART - B ...;: ' ,,

5 a. With a neat diagiam, explain the structure of text editor. ,:, (10 Marks)b. Explain the features of interactive debugging system. (10 Marks)

6 a. List maihine independent macro processor features. Explain any two withan example.

..,.,,,,,,,-4.'','.;.......,: (10 Marks)b. jlV,hat are the basic functions of macroprocessor? Explain the various data stfu0Jpres used in

,,.r, ,, , 1he implementation of one - pass macroprocessor. ,,r

(10 Markg

'.,.,.;,..,,""7-',,,':,'v. List.and explain the different design options for a macroprocessor. (li'Marks),' b. Explain the structure of LEX program. (05 Marks)

c. Explain the "communication parser". (03 Marks)

8 a. Write a LEX program to count the number of vowels and consonants in a given string.(06 Marks)

b. Write a YACC program to recognize the given arithmetic expression containing *, -, l, *operator. (08 Marks)

c. What do you mean by ambiguous grarnmer? How it can be overcome? Illustrate with anexample. (06Marks)

Note: Answer FIVE Ttestions, selecting

*{<r<**

Fifth Semester B.E.

USN

Time: 3 hrs.

la.

b.

tion, December 2Ol2

Systems Software

Note: Answer FIVEfull questions, selectingat least TI'VO questions from euch port.

10cs52

Max. Marks:100

ooo

o()

E.5

6e

st

.= a.l- dS

o Y:J

otr-O

o>

dX

oc)

boi(gd

>(!

3().a'

!)

,).FO.o'"()Fl

rdLO)E

>(F^;ocbo0=o-Utr>=oO

\J<-i ^ioozfoo

PART - AExplain the instruction formats and addressing modes of SICXE machine architecture.

(10 Marks)Generate the target address for the following ob.ject codes:

2a.b.

i) 032600 ii) 010030Content ofX: 000090; Content ofB:006000; Content ofPC:003000 (04 Marks)Write a SIC/XE program to read 100 by.te record from a device 'F5' into BUFFER. Useimmediate and register-to-register instructions. (06 Marks)

With an algorithm, explain pass-l of a 2-pass assembler. (10 Marks)Generate the object code for each statement and write the object programs for the followingSIC/XE program.Given that: CLEAR: B4, LDA: 00, LDB : 68, ADD : 18,

TIX:2C, JLT : 38, STA: OC

SUM START O

FIRST CLEAR XLDA #O

+LDB #TOTALBASE TOTAL

LOOP ADD TABLE, XTIX COLINTJLT LOOPSTA TOTAL

COLTNT RESW 1

TABLE RESW 2OOO

TOTAL RESW 1

END FIRST (10 Marks)

3 a. With required data structures and processing logic, explain the implementation of literalswithin an assembler. (07 Marks)

b. What are program blocks? How multiple program blocks are handled by an assembler?(07 Marks)

c. Compare a two-pass assembler with a single pass assembler. How forward references are

handled in one-pass assembler? (06 Marks)

4 a. Define program relocation. Explain the different ways of doing program relocation.

b. With an algorithm, explain pass 1 of a linking loader.c. Explain the facilities available in MS-DOS linker for program linking.

(06 Marks)(08 Marks)(06 Marks) *

I of2

5a.b.

c.

6a.

b.c.

ta.b.

8a.

b.

PART - BWith a neat diagram, explain the working of typical editor structure.Explain the debugging functions and capabilities of an interactive debugging system.

List the four tasks of a document editing process.

PROCESSOR.With an example, explain generation of unique labels in macros.

c. Write a short note on shift/reduce parsing.

Define MACRO. Briefly explain the various data structures used in the design of MACRO

10cs52

(08 Marks)

(08 Marks)(04 Marks)

(08 Marks)(06 Marks)

(07 Marks)(05 Marks)

Explain the advantages and disadvantages of general purpose macro processors. (06 Marks)

With an example, explain the structure of a LEX program. (07 Marks)Write regular expressions to identiff the following:i) Identifier ii) Decimal number iii) - ve integer iv) + ve fraction (08 Marks)

c. Write a short note on parser-lexar communication. (05 Marks)

DefineYACCtools'WhatarethetwotypesofconflictsinYACC?Giveexamples.(08 Marks\

Write a YACC program to evaluate an arithmetic expression involving operators *, -, *, y

2 of2