You are on page 1of 10

c 

c  c   c c  



 


   c   c 
   c 


 c !

a.Y Ô arn
 Ô riphra ntrfac Ôimr)
.Y Ô arnh t c nfigur rt rtasac ntr rgistranddatadircti n
c.Y Ô arnh t cutsimppr gramasithfrrr rs
d.Y Ô arnh t c mmunicatthass ftarand gic

trainr
id


"  

a.Y  gic

trainrid
.Y as ntgratd pmntnir nmnt ftar
c.Y Wind s Ô )prtrmina ftar
d.Y  mputr
.Y Laht



 c p
 
Ôhisprimntisintnddasanitr ducti nt d ppr gramsrittnin t r a


assmanguagandsimuatthprimnt nthprimnt ard



 c



.Y dit rpr gramrusdt ritthpr grammingas andrsadas
L .p

! "#$!%




 #. &%
%

'c nfigurp rtasc ntr rgistr


 #. &%

%

('c nfigurp rtasdatadircti n


 #. &%
%

)'c nfigurp rtasc ntr rgistr


 #. &%))%

*'c nfigurp rtasdatadircti n


 #.&%

%

'cara utput 
 Ô$ &
'usf r utputdatasricr utins 
" ! "











.Y L .rcutusdas ftarithfrrr rs.
÷  
          



.Y  mmunicati ninprtrmina)rsttdas p
a.Y ssumthatth has tdupitisinthWind snir nmnt
.Y ! t thWind s #sct
ccss risї mmunicati nsї$%&'&'()*+,
c.Y Ôhscrnitrt stupanc nncti nandasdthusrf ran
c nncti nnam.Justtp+ -asanamp.ic#
d.Y tthnasd uf rthtp fhardarc mmunicati nprfrrd.h s
 nncti nusingpc andcic+ -n tp#,c udch sing
sttingat )
.Y + rtttingscrnip p utitsh sthparamtrhich ucan
m diff raparticuarc mmunicati npr t c .Y umustf  th
f  ingsttingsp
-Y â

+.+/).0%&'0&12*34&.'+)*&'/2+'32*,$2%&'+.&+..4)0
0%&&3
-Y +.+/).0
-Y +').$2*&
-Y .2%/).0
-Y ,25c2*.'2,+'35+'&
6 -rcicdt pr cd.Y uidirctdt thprtrminascrn


-.Y Ôhind shprtrminapr gramrrunt maac mmunicati ntn
c mputrand gic

trainridand rprssd n
thsstm ardandthnhitth7c89&$ nth  ardc ntin usa
ftims)unti ucansatrminamssagisdispad nthm nit r.Y u
sh udat gtth&'()*+,(:,+.2';%'2(%.#assh n p








 -!< =
 ><<

$%&6 &,% &*:#c.212*.)*:&><<
;


a)Y %+1&rprssdt c ntinu.Ôh mssagis.
rsd rt c ntinudunti ugtth+ $#!$
#"Ô$#Lmssagasf  sp


? c  @
 c  @
c  @
 ? ?  @
 ? c  @





)Y ÔhVcA9&$.2&*.&'rprssdt thsumnuithinthismain-mnu.Y u
sh udgtp


 ? c  @
 c  @
c  @
 ? ?  @
 ? c  @
 B c @C








c)Y Ôh.$/rprssdt sctdthis pti n.Y ush udsp

 ? c  @
 c  @
c  @
 ? ?  @
 ? c  @

 25*,2+3c23&@C
 c23&&D EE0&.c

A@C








d)Y .$/rprssdt pr cd.Y uigtp
 
 
 ? c  @
 c  @
c  @
 ? ?  @
 ? c  @


 25*,2+3c23&@C
 c23&&D EE0&.c

A@C
 &1&)F&3&+3$><%'&00&0&..2+/2'.







 
)Y Ôh+prtrminaind atthism mntrch snth+Ôransfr
mnusct+ndÔt)iandd ucicd nth '&12'3E),& uisht 
d n ad͙
fthd n adpr cssissuccssfuthf  ing uigtp






D&1:.)*G4&'2G'+(

f)Y Ôh rprssduntirachdth $#!$#"Ô$#Lmnu. rss
.$/t sctdthis pti n
 
 ? c  @
 c  @
c  @
 ? ?  @
 ? c  @

g)Y "Ô$rprssdand ugtth+ n ad d pti nassh n p

 ? c  @
 c  @
c  @
 ? ?  @
 ? c  @
25*,2+3c23&@C

h)Y Ôh rprssdt gtth+cut r gram pti nassh n p

 
 ? c  @
 c  @
c  @
 ? ?  @
 ? c  @

25*,2+3c23&@C
D&1:.&'2G'+(@

i)Y .$/rprssdt sctthis+cut r gramsu-mnup


 ? c  @
 c  @
c  @
 ? ?  @
 ? c  @

25*,2+3c23&@C
D&1:.&'2G'+(@
33'A@C




"  u ar r0uird .2 9&$ )* .4& 0.+')*G +33'&00 f th pr gram hich  u ha 1ust
d n adf  d.$/.Y urpr grammicutdandrunningassh n p

25*,2+3c23&@
D&1:.&'2G'+(@
33'A@â

V1'A
:**)*G>>


(.Y #utputidispad n urtrainr ardaftrcutdthpr gram








23Ô #"p



.Y hangthpr gramming fL .t sta utput#")andsaasaL 2 .








.Y  mparthrsut fL .ithL 2 .anddiscusshatadiffrnctnf r
 th utputs


$3LÔL .p















$3LÔL 2 .p




Ôhdiffrnctnf r th utputarhnthinputhaaddrss

c

th utput
 ud-L nthtrainriight.ndhngiaddrss ninput

c
th uput n
thtrainraLiight. tiscausgiinputinithritmansthasicsf r prating
ininardigit4





.Y Writthc ncusi nthat ugtfr mthisprimnt

Ôhisprimntisintnddasanitr ducti nt d ppr gramsrittnin t r a


assmanguagandsimuatthprimnt nthprimnt ard. nthisprimntt 
arn
 Ô riphra ntrfac Ôimr)arnh t c nfigur rt rtasc ntr 
rgistranddatadircti narnh t acutsimppr gramasithfrrr sand
arnh t c mmunicatthass ftarand gic

trainrid.as
ntgratd pmntnir nmnt ftarha$ata$gistr)it rast dtrminach
data. tas ha(tp fdata5tndd"5ngati657r #5 rf and5carr.Ôhis
pr cduritithsami ftar88causitas hah t c mpiandcutth
input.ndifgtrr rsth utput udt tar ng.



-.Y Writthdiscussi nthat ugtfr mthisprimnt

icr pr css rpr ductsfr m t r aisfirstin 9*-.ip

isandicit.n thr
chipdsignisdridfr m

asuit(
#Ôchn  g(
 rp rati n.ipusd
inthpp thfirstprs nac mputr.Y

famit rpacth 3 fthc mputr


sstm t r an hasa$ pr css riththrand r  r c ntr r 99 )
hichhahighrc stsandthaiit ffami

.Whnthinputrginaddrss


c

th-L nthtrainrin tight.ndthnhnthinputrgin



c

tha
L nthtrainriight.Ôhisiscausthinputarinthinarc dsuchas
.ÔhLi
n tightcaus fthinputrr ngandmustcutthinputtiitn thaanrr r.