Ss Unit 1 Notes
Ss Unit 1 Notes
UNIT 1 INTRODUCTION
SYSTEM SOFTWARE AND MACHINE ARCHITECTURE THE SIMPLIFIED INSTRUCTIONAL COMPUTER MACHINE ARCHITECTURE DATA&INSTRUCTION FORMATS ADDRESSING MODES INSTRUCTION SETS I/O PROGRAMMING
INTRODUCTION:
System Software co s!sts "ar!ety of #ro$rams t%at s&##ort t%e o#erat!o of a com#&ter' T%!s software ma(es !t #ro"!)e !t #oss!*+e for t%e &ser to foc&s o a a##+!cat!o or ot%er #ro*+em to *e so+"e), w!t%o&t ee)! $ to ( ow t%e )eta!+s of %ow t%e mac%! e wor(s ! ter a++y1' Pro*a*+y a++ t%e #ro$rams are wrote ! a %!$% +e"e+ +a $&a$e +!(e c-- or #asca+ &s! $ a te.t e)!tor to create a ) mo)!fy t%e #ro$ram' T%ose #ro$rams are tra s+ate) o to mac%! e +a $&a$e &s! $ a com#!+er2'T%e res&+t! $ mac%! e +a $&a$e #ro$ram was +oa)e) ! to memory a ) #re#are) for e.ec&t!o *y a +oa)er or +! (er3' I +ater co&rses, #ro*a*+y a++ t%e #ro$rams are wrote ! assem*+er +a $&a$e' Use) macro ! str&ct!o s ! t%ese #ro$rams to rea) a ) wr!te )ata or to #erform ot%er %!$%er +e"e+ f& ct!o s4' Use) a assem*+er, w%!c% #ro*a*+y ! c+&)e) a macro #rocessor to tra s+ate t%ese #ro$rams ! to mac%! e +a $&a$e' A++ t%ese #ro$rams *y ! teract! $ w!t% t%e o#erat! $ system of t%e com#&ter' If we are &s! $ a system +!(e UNI/ or DOS, we ty#e) comma )s at a (ey*oar)' If we are &s! $ a system +!(e MACOS or 0INDO0S we s#ec!f!e) comma )s w!t% me &s a ) a #o! t a ) c+!c( ! terface'
t t h
/ : p
s c /
u t e
. e b
/ k t
1. 2. 3. 4.
2 MARKS! D"#$%" S&'(") S*#(+,-". D"#$%" .*)/$0"-. D"#$%" 0*,1"- *- 0$%2"-. W3,( ,-" (3" 4'"' *# ),.-*5
III CSE
UNIT 6 1
http://csetube.weebly.com/
1. SYSTEM SOFTWARE AND MACHINE ARCHITECTURE7 Most system software )!ffers from a##+!cat!o software !s mac%! e )e#e )e cy' A a##+!cat!o #ro$ram !s #r!mar!+y co cer e) w!t% t%e so+&t!o of some #ro*+em, &s! $ t%e com#&ter as too+' APP1ICATION PROGRAM
OS MNEMONICS3OPCODE4
COMPI1ER
T%e foc&s !s ! t%e t%e a##+!cat!o , ot o t%e com#&t! $ system' System #ro$rams are ! te )e) to s&##ort t%e o#erat!o a ) &se of t%e com#!+er !tse+f,rat%er t%a a y #art!c&+ar o#erat!o ' T%ere are some as#ects of system software t%at )o ot )!rect+y )e#e ) &#o t%e ty#e of com#&t! $ system *e! $ s&##orte)' 0e m&st ! c+&)e rea+ mac%! es, rea+ #r!ces of software' Howe"er most rea+ com#&ters %a"e certa! c%aracter!st!cs t%at are & &s&a+ or e"e & !2&e' It ca *e )!ff!c&+t to )!st! $&!s% *etwee t%ose feat&res of t%e software t%at are tr&+y f& )ame ta+' To a"o!) t%!s #ro*+em we #rese t s!m#+!f!e) ! str&ct!o a+ com#&ter3SIC4'T%!s !s &se) to a"o!) !rre+e"a t com#+e.!t!es'
t t h
/ : p
s c /
u t e
. e b
/ k t
MACHINE
III CSE
UNIT 6 1
http://csetube.weebly.com/
T%!s mac%! e %as *ee )es!$ e) to !++&strate t%e most commo +y e co& tere) %ar)ware feat&res a ) co ce#ts' T%!s mac%! e )!"!)e) ! to two "ers!o s: Sta )ar) "ers!o /E "ers!o 3 /E 56 E.tra e2&!#me t or E.tra e.#e s!"e4 T%e two "ers!o s %a"e *ee )es!$ e) to *e &#war) com#at!*+e' 3!'e4 A o*7ect #ro$ram for t%e sta )ar) SIC mac%! e w!++ a+so e.ec&te #ro#er+y o SIC//E system 9 '
M")*-&7 Memory co s!sts of 8 *!t *ytes' 9 co sec&t!"e *ytes form a wor)'3:; *!ts4< A++ a))resses o SIC are *yte a))resses 0or)s are a))resse) *y t%e +ocat!o of t%e!r +owest &m*ere) *yte' T%ere are a tota+ of 9:,<=83:>? *ytes4 ! t%e com#&ter memory'
t t h
/ : p
s c /
u t e
. e b
/ k t
III CSE
UNIT 6 1
http://csetube.weebly.com/
R"=$'("-'>:
T%ere are f!"e re$!sters' Eac% re$!ster !s :; *!ts ! +e $t%' T%e re$!sters are A? @? L? PC?SW. MNEMONIC A @ L NUMBER 0 1 2 SPECIAL USE Acc&m&+ator' Use) for ar!t%met!c o#erat!o s' I )e. Re$!ster' Use) for a))ress! $' 1! (a$e re$!ster' T%e 7&m# to s&*ro&t! e ! str&ct!o stores t%e ret&r a))ress ! t%!s re$!ster' Pro$ram co& ter' Co ta! s a))ress of t%e e.t ! str&ct!o to *e fetc%e) for e.ec&t!o ' Stat&s wor)' Co ta! s a "ar!ety of ! format!o ! c+&)! $ a co )!t!o co)e3cc4'
PC SW
> A
D,(, #*-),('A7
I te$ers are store) as :; @ *!t *! ary &m*ers' :As com#+eme t re#rese tat!o !s &se) for e$at!"e "a+&es' C%aracters are store) &s! $ t%e!r 85*!t ASCII co)es' T%ere !s o f+oat! $ #o! t %ar)ware o t%e sta )ar) "ers!o of SIC'
I%'(-4.($*% F*-),('107 A++ t%e mac%! e ! str&ct!o s are :; *!t format' > opcode 1 x 18 address
t t h
/ : p
s c /
u t e
. e b
/ k t
x indicates indexed addressing mode (2MARKS) >. W3,( ,-" -"=$'("-' $% SIC5E:/0,$%. A. D"#$%" 1,(, #*-),(' $% SIC. 10. D"#$%" $%'(-4.($*% #*-),(' $% SIC.
III CSE
UNIT 6 1
http://csetube.weebly.com/
A11-"''$%= M*1"'117 T%ere are two a))ress! $ mo)es a"a!+a*+e' Pare t%es!s are &se) to $%1$.,("' t%e co te ts of a re$!ster or a memory +ocat!o ' MODE DIRECT INDE/ED INDICATION /BC /B> TARGET ADDRESS CALCULATION TABADDRESS TABADDRESS-3/4
I%'(-4.($*% '"(127 SIC #ro"!)es a *as!c set of ! str&ct!o s t%at are s&ff!c!e t for most s!m#+e tas(s' T%ese ! c+&)e ! str&ct!o s t%at +oa) a ) store re$!sters 31DA,1D/,STA,ST/ etc',4 a ) ar!t%met!c o#erat!o s3ADD,MU1,SUD,DIE4' T%ere !s a ! str&ct!o COMP t%at com#ares t%e "a+&e ! re$!ster A w!t% a wor) ! memory' T%!s ! str&ct!o sets a CONDITION CODE CC! to ! )!cate t%e res&+t'3F,6,B4 Co )!t!o a+ 7&m# ! str&ct!o s 3BLT?BEC?BGT4 ca test t%e sett! $ of cc a ) 7&m# accor)! $+y' Two ! str&ct!o s are #ro"!)e) for s&*ro&t! e +! (a$e' BSUB G&m#s to t%e s&*ro&t! e,#+ac! $ t%e ret&r a))ress ! re$!ster 1' RSUB Ret&r s *y 7&m#! $ to t%e a))ress co ta! e) ! re$!ster 1 I%/4( ,%1 *4/4(137 I #&t a ) o&t#&t are #erforme) *y tra sferr! $ > *yte at a t!me to or from t%e r!$%tmost 8 *!ts of re$!ster A' Eac% )e"!ce !s ass!$ e) a & !2&e 8 *!t co)e' T%ere are t%ree I/O ! str&ct!o s, TD7 Test De"!ce ! str&ct!o tests w%et%er t%e a))resse) )e"!ce !s rea)y to se ) or rece!"e a *yte of )ata' T%e CONDITION CODE !s set to ! )!cate t%e res&+t of t%!s test' A sett! $ of D mea s t%e )e"!ce !s -",1& (* '"%1 *- -"."$E"? a ) F mea s t%e )e"!ce !s %*( -",1&. A #ro$ram ee)! $ to tra sfer )ata m&st wa!t & t!+ t%e )e"!ce !s rea)y, t%e e.ec&te a Rea) Data3RD! or 0r!te Data3WD!.
t t h
/ : p
s c /
u t e
. e b
/ k t
2 MARKS! 11. E:/0,$% ,11-"''$%= )*1"' $% SIC. 12. D"#$%" $%'(-4.($*% '"( $% SIC. 13. W3,( ,-" (3-"" .*%1$($*%' $% I/O $%'(-4.($*%'5E:/0,$%.
III CSE
UNIT 6 1
http://csetube.weebly.com/
2.2 SIC @E MACHINE ARCHITECTURE147 M")*-&7 Memory co s!sts of 8 *!t *ytes' 9 co sec&t!"e *ytes form a wor)'3:; *!ts4 A++ a))resses o SIC are *yte a))resses 0or)s are a))resse) *y t%e +ocat!o of t%e!r +owest &m*ere) *yte' T%ere are a tota+ of > Me$a*yte3::C *ytes4 ! t%e com#&ter memory' T%!s $%.-",'" 0",1' (* .3,%=" $%'(-4.($*% #*-),(' ,%1 ,11-"''$%= )*1"'. R"=$'("-'18: T%ere are f!"e re$!sters' Eac% re$!ster !s :; *!ts ! +e $t%' T%e re$!sters are B?S?T?F. MNEMONIC B S T F
19
NUMBER 3 4 8 9
SPECIAL USE
Dase re$!ster' Use) for a))ress! $' Ge era+ wor(! $ re$!ster' Ge era+ wor(! $ re$!ster'
D,(, #*-),(' 7 SIC//E )ata formats same as SIC Sta )ar) "ers!o ' T%ere !s a ;85*!t f+oat! $ #o! t )ata ty#e' > S
t t h
>> E/PONENT
/ : p
s c /
u t e
. e b
/ k t
9= FRACTION
T%e fract!o !s ! ter#rete) as a "a+&e *etwee C a ) >' T%e ass&me) *! ary #o! t !s !mme)!ate+y *efore t%e %!$%er or)er *!t' For orma+!He) f+oat! $ #o! t &m*ers' T%e %!$%er or)er *!t of t%e fract!o m&st *e >' T%e e.#o e t ! ter#rete) as a & s!$ e) *! ary &m*er *etwee C a ) :C;<' If t%e e.#o e t %as "a+&e e, fract!o f a ) t%e a*so+&te "a+&e of &m*er re#rese te) !s #G2 "61024! 14. E:/0,$% $% 1"(,$0 ,;*4( SIC/@E. 19 MARKS! 18. W3,( ,-" -"=$'("-' $% SIC/@E5E:/0,$%. 2 MARKS! 19. D"#$%" 1,(, #*-),(' $% SIC/@E. 2 MARKS! III CSE UNIT 6 1
http://csetube.weebly.com/
I%'(-4.($*% F*-),('1<7 T%e 0,-="- )")*-& a"a!+a*+e o SIC/@E )",%' t%at a ,11-"'' +$00 %* 0$%="- #$( ! to a >? @ *!t f!e+)' T%&s t%e ! str&ct!o format &se) o t%e '(,%1,-1 E"-'$*% *# SIC $' %* 0*%="- '4$(,;0". T%ere are two #oss!*+e o#t!o s, E!t%er &se some form of re+at!"e a))ress! $' E.te ) t%e a))ress f!e+) to :C *!ts' FORMAT 1 1 BYTE!7 > OPCODE FORMAT 2 2 BYTES!7 > OPCODE FORMAT 3 3 BYTES!7 9 OPCODE 4 r> 4 r:
1 111 1 1 12 ! . * # e DISP1ACEMENT
FORMAT 4 4 BYTES!7
t t h
/ : p
s c /
u t e
. e b
/ k t
9 OPCODE
1 111 1 1 20 ! . * # e DISP1ACEMENT
2 MARKS 1<. E:/0,$% $%'(-4.($*% #*-),(' *# SIC/@E. 1<.,! W3& (3" ,11-"'' #$"01 ":("%1"1 $%(* 20 ;$('5'(,(" (3" -",'*%.
III CSE
UNIT 6 1
http://csetube.weebly.com/
A11-"''$%= M*1"'1>7 T%ere are two *as!c a))ress! $ mo)es a"a!+a*+e' Pare t%es!s are &se) to $%1$.,("' t%e co te ts of a re$!ster or a memory +ocat!o ' MODE DASE RE1ATIEE PROGRAM COUNTER RE1ATIEE INDICATION DB>,PBC DBC, PB> TARGET ADDRESS CALCULATION TAB 3D4-DISP 3C FB )!s# FB ;CI?4 TAB3P4-DISP 35:C;8 FB )!s# FB :C;<4
DBC , P B C 3FOR FORMAT ;4 DIRECT ADDRESING DASE RE1ATIEE INDE/ED ADDRESSING PROGRAM COUNTER RE1ATIEE INDE/ED ADDRESSING DBC, PBC 3FOR FORMAT 94 DB>, PBC,/B>
IMMEDIATE ADDRESSING
p t t
/ / :
DBC, PB>,/B>
e s c
b u t
e.
/ k t
TA B DISP1ACEMENT
TAB 3D4-3/4-DISP1ACEMENT
TAB 3P4-3/4-DISP1ACEMENT TARGET ADDRESS IS OPERAND EA1UE TARGET ADDRESS IS FETCHED TARGET ADDRESS TAJEN 1OCATION OF THE OPERAND
IB>,NBC
1>. W3,( ,-" ,11-"''$%= )*1"' $% SIC/@E. 2),-2'! 1>.,! E:/0,$% $% 1"(,$0 ,;*4( ,11-"''$%= )*1"' *# SIC/@E. > ),-2'!
III CSE
UNIT 6 1
http://csetube.weebly.com/
I%'(-4.($*% '"(1A7 SIC//E #ro"!)es a++ of t%e ! str&ct!o s t%at are a"a!+a*+e o t%e sta )ar) "ers!o ' I a))!t!o , t%ere are ! str&ct!o s to +oa) a ) store t%e ew re$!sters31DD,STD,etc'4 a ) to /"-#*-) #0*,($%= /*$%( ,-$(3)"($. */"-,($*%' ADDF?SUBF?MULF?DIVF!20 RMO REGISTER MOVE INSTRUCTION ! c+&)es re$!ster to re$!ster ar!t%met!c o#erat!o s3ADDR?SUBR?MULR?DIVR!21. A s#ec!a+ SUPERVISOR CALL SVC! ! str&ct!o !s #ro"!)e)' E.ec&t! $ t%!s ! str&ct!o $e erates a ! terr&#t t%at ca *e 4'"1 #*- .*))4%$.,($*% +$(3 (3" */"-,($%= '&'(")22. I%/4( ,%1 *4/4( 7 T%e I/O ! str&ct!o s for SIC are a+so a"a!+a*+e o SIC//E' I a))!t!o , t%ere are I/O c%a e+s t%at ca *e &se) to #erform ! #&t a ) o&t#&t w%!+e t%e CPU !s e.ec&t! $ ot%er ! str&ct!o s' T%e ! str&ct!o s SIO?TIO a ) HIO are &se) to '(,-(?("'( a ) 3,0( t%e o#erat!o of I/O c%a e+s' 2 MARKS 1A.D"#$%" $%'(-4.($*% '"( *# SIC/@E. 20. S(,(" #0*,($%= /*$%( ,-$(3)"($. */"-,($*%'. 21. D"#$%" RMO. E:/0,$%. 22. D"#$%" SVC. E:/0,$%. 23. D"#$%" SIO?TIO HHIO. E:/0,$%.
23
t t h
/ : p
s c /
u t e
. e b
/ k t
III CSE
UNIT 6 1
http://csetube.weebly.com/
1. SAMPLE DATA MOVEMENT OPERATIONS FOR SIC AND SIC/@E. SIC PROGRAM7 LDA STA LDCH STCH SIC/@E PROGRAM7 LDA STA LDA STCH J8 ALPHA JA0 C1 LOAD VALUE 8 INTO REGISTER A STORE IN ALPHA LOAD ASCII CODE FOR I INTO REG A STORE IN CHARACTER VARIABLE C1 FIVE ALPHA CHARI C1 LOAD CONSTANT 8 INTO REGISTER A STORE IN ALPHA LOAD CHARACTER I INTO REGISTER A STORE IN CHARACTER VARIABLE C1
2. SAMPLE ARITHMETIC OPEARATIONS FOR SIC AND SIC/@E. ALPHAKINCR61 F BETA GAMMAKINCR61 F DELTA SIC PROGRAM7 LDA ADD SUB STORE LDA ADD SUB STORE
t t h
SIC/@E PROGRAM7 LDS LDA ADDR SUB STA
/ : p
s c /
u t e
. e b
/ k t
III CSE
UNIT 6 1
http://csetube.weebly.com/
3. SAMPLE LOOPING AND INDE@ING PROGRAM FOR SIC AND SIC/@E7 SIC PROGRAM7 MOVECH LD@ LDCH STCH TI@ BLT IERO STR1?@ STR2?@ ELEVEN MOVECH
SIC/@E PROGRAM7 LDT LD@ LDCH STCH TI@ BLT J11 J0 STR1?@ STR2?@ T MOVECH
MOVECH
4. SAMPLE INPUT AND OUTPUT OPERATIONS FOR SIC AND SIC/@E7 SIC PROGRAM7
t t h
OUTLP
INLOOP
/ : p
s c /
u t e
. e b
/ k t
III CSE
UNIT 6 1
http://csetube.weebly.com/