Sunteți pe pagina 1din 16
DOCUMENT OF ARADHYA TUTORIALS® RIGHTS RESERVED. WU puvr-00 . sors sin go 33111 Suse anus nt -— Machine TneTavetions ~ Addnessing Mode - Assembly language - Basic Lo operation - STacks £ qveves - SubsovTine — Additional Tnstavction ie Encoding of machine instar This Notes is valid * only for the duration * Jan-2014 to Dec-2014 pad soa ey JCLASSES ARE ALSO CONDUCTED FOR EC/ EEE /IT/TC BRANCH 99728 siut1 SUBJECTS @ ARABHYA TUTORIALS Son27 31111 DOCUMENT OF_ARADHYA TUTORIALS® RIGHTS RESERVED ‘waren: 216) PAsie INP T TIONS BAsic INPurfourPuT oPERAT Tae SSSI alla * only for the duration * Jan-2014 to Dec-2014 ‘the phrocessoA. , The input unit 4 ovipol unl, yoould be connected ‘Together using: Single Bus as shown below. Bus a Os Keyboard the dota entered ot The Ke pepe Ors wnt] needs fo be fetched 4 once fetchin QgiPleried, This has To be displayed onlo The ovipuT devit foniToh J - the Keyboard consists of a 3 bir bolfer egiste known as DaTAIN hegister: \ The DaATAIN Ae, is used To Stone The binary Valve oF key Ppaessed- .. “The freybo o has a Sin bit Catotvs IN} bit ‘To indicate DATAIN aegicter The sin bIT will be set the Sis oF ip The pataiN 15 having: Some valve- A Phogrvam consvarib yy chechs The stolvs oP sin, CP it is ser, Processor feads The data faom DATAIN Fegister Similoay.., The ovlpuT device wilt hove a DATQouT Register. The DATAovT hegister wil store The data which needs To be dispray. 9845642144 (MALLESHWARAM) 9972731111 (JAYANAGAR) 9972851111 (VIJAVANAGAR) 9901942144(INDIRANAGAR) SERVED. ie 6 RK con pocuEN: DHYA TI The paocessoA { The ovtpot device operate at diPPexent Speed. “The ovlpst device is notwnally Blower device Than Proce ssoh- As a nesuld, he processor need To wail Until The ovtpur device’ becomes Aeady- - “the processor before sending The Dota To OATAovT Aegistes has to check The Status > As oa hesvit, a SovT Tstaws ot] bit is This is set only if ovtpor device is ready To ace; pen A Proghom checks The status contin Oy iv is set, The output device is heady To accepl x a 4 Processor sends ‘he data- & Phoghom =7 ite Se Notes. yr This Notes is valid * only for the duration * Jan-2014 to Dec-2014 FOR ECJEEE/IT/TC BRANCH SUBJECTS @ ARADHYA TUTORIALS 9845642144 (MALLESHWARAM) 9972731111 (AYANAGAR) 9972851111 (VIJAVANAGAR) 9901942144(INDIRANAGAR) De [YA TUTORIALS® RIGHTS RESERVI ave no: ALG) SUBROUTINGS Tn a given Phogham, iT might be dequited To execute Some Task many Timer but “on difPeent data_valves The Task is called as subroutine The advantage of subroutine is ThaT , insteattes The “Task muitiple Times on The Memory fos execution, Si N¢ calr iT would be better to place only a ng Oy) iT mvtliple Times. ES “his Saves lot of space on The Prim mony. qe sebfovTine con be executed bi Sry vse of a CALL InévAvcTion- a wohen The CALL instavetion i era, The cPv jumps To The location of subjoutine 4 Begins To execte Tho i insthuctions ef — sybsovTine. he ~=Paogaam which Ms The svbsovTine is called a. O le S Cal Paognam This Notes is valid once The @; a of subsouTine * only for the duration * ay! has To back TO calling PAogaam ain Jan-2014 to Dec-2014 Sire 2 be achieved by making vse of RETURN inztay johen catt To subjovtine is made, The contents of Phogtom counts is Stoted on " Progaam Counter must be waded ion seh Domne yzubn ilu |) rel ABRAE RL i enn ne ate | 80 The cPv can baanch To tha Once The. execution of subsovtir ig completed, centéars Lp Bink Register hos Te be copied “back Do Progaum “counter ie linkage. This call & deTvin 1S AefPered “wes B26 evel. vot OA ATR BBE EES Set poeine 9845602144 (MALLESHWARAM) 9972731111 GAYANAGAR) 9972851111 (VUAYANAGAR) 9901942144€INDIRANAGAR) pocumenr oF ARADHYA TUTORIALS® RIGHTS RESERVED page no: S(\6) i cop Example: 20 Call) SUB = ion rice Kae Baran SO) Sora? 31th “This Notes is valid * only for the duration * Jan-2014 to Deo-2014 ‘Paocessoh stack = explain subsovTine ne Subpovtme ee chinigue in which one sebhouTine cals another 7 In This cas a a single tn Aegives is used, The Processoad nov aie To calling: Prognam ot all. De “his Spreovse, wohen The call To 9" subroutine is made, “the 4etvan addsess of second call ee stoxed “, “ in tink Aegistea , Thue Pose eatieing: old valve ThesePore actuinaddtess axe etvaed on a memon leeation Known as Stack in @ last in Piast soul LLFe} oAdet. A fegistex Known os Stack pomrea ‘is used To pemT To | top oP stack - 9845642144 (MALLESHWARAM) 9972731111 JAYANAGAR) 9972851111 (VIJAYANAGAR) 9901942144(INDIRANAGAR) MENT RADI ALS® RIGHTS RESERVED. eno: Ge The cal. insPAvcTion pyshes cortent oP Pc onto The STack 4 londs sobfovtine addaess into Pc. The #eTvAn insTAveTion pope “The AeToan addaess Prom Phocessos Stack onto Pc. This Notes is valid * only for the duration * Jan-2014 to Dec-2014 [CLASSES ARE ALSO CONDUCTED FOR EC/EEE/IT/1C BRANCH SUBJECTS @ ARADHYATUTORIALS PUSERHAIALLESHWARAM) 9972731111 GAYANAGAR) 9972851111 (VIJAVANAGAR) 9901942144(INDIRANAGAP) DOCUMENTOF ARADHYA TUTORIALS® RIGHTS RESERVED page no: 1 (Ie) ‘ eoh Mention foun Types of opesutions ‘lo be Peaformed by InsPauction » Deta Taanster, between memory 4 Processoa AegisTe. + Asithmetic 4 logic operations on data Prognam sequencing 4 conTsol. + T)o Taonsfers. >\ Memoay location and addaess are Memory consists of millions Sonn celk . Each cell con stoie a bit oP ae. The single bit is a vety Small in foxmation , Keg a group oF cells ate Used. @R0up of. na biises: called as 108d 4 nis Ned word te The memosy is Collection of cal low. sie as Sho is Notes is valid sponge ee }* only for the duration * ae ie Jan-2014 to Dec-2014 first word | second word =f ast word ‘9845642144 (MALLESHWARAM) _ 9973731111 GAYANAGAR) "9972851111 (VIJAYANAGAR) 9901942144(INDIRANAGAR) DOCUMENT OF ARADHYA TUTORIALS® RIGHTS RESERVED yt) “The compuTese noamally have wo2d length of 16 To 64 bits A group of & bis is called byte, Acce ssing The memory To Tose 0% BeTAIeVE an eithe, fom a woad ofA byre, io ts in formotion, it. Fon This puapose Aequised TO uniquely identify addsesses fe Used- There axe 3 quontities © A Bit ~ at @ 4 Byre T qxoup of @ bits] SS © 4 wotd TL Gaovp of let Séa bits] NS lonat is. Byre addte: 6S ? Exploin diff exenr me of Byre add 4essal tty we : This Notes Is valid * only for the duration * wr Refes clogs Note. 014 to Deo-2014 x Exeleing Sept alignment. Tn case of a 39 bit toon Jength, toord boundasres words aae soid To be in memory ie They begin ata byte a muitiple oP numbes of byter. less woonds begin AG 0) One oas seam ase present ©, 4, 2 CTC. aligned addsess which is Te woad length 's TR word length is bq, words begin aE 105 642144 (MALLESHWARAM) 9972731111 (JAYANAGAR) 9972851111 (VIJAVANAGAR) 9901942L44(NDIRANAGAR) Fie ERVED. : Cob boc ‘A TUTORIALS: loith an example Stacight Tine Serco ye Assume in The compote; The insTavction C=A+B has To be executed: Then The instavction in assembl, Tamguage can be waltten as shown below Move A,Ro Move 8,R, a ADD RoR, Move Rj, ros on To RAM ‘instaveTed hove To < “These befose execotion a wovld be as shown below: rh t Y Move A,Ro T+ XN Move B,Ri i App. RoR Move Ric 2 SOR |CLASSES ARE ALSO CONDUCTED 4 gore suit NB) Sg ‘SUBJECTS @ ARADHYA TUTORIALS i we : = 9845642144 (MALLESHWARAM) 9972731111 (TAVANAGam ome MENT OF DH ORIALS® x6) ve The Psocessoa consists of @ 4egiste, kKnovon Paogram counte Dred. Inee he holds next instavetion To be executed. as oddaess of of Bact into PC. NexT Pprocessoz execute ins Txuction To begin The execvtion, addaess insta ction Ci) most be placed P4esent art eradese (ira) after vaeh ciaeoa shis is called as stanrght Tne we On. logite a note n_ Branching oa En cose of Branch nee? ay The proceso begins To execvTe rag ‘jebitlonss called! ds i Baanch Taxgel >» names executing the = insTauctions one abter toy Bie ii Vitanch 4 The baonch wovld Take place ote ye (Give The example of odding n numbers dition is satishied. fiom class NoTes) This Notes Is valid * only for the duration * Jan-2014 to Dec-2014 45647144 (MALLESHWARAM) 9972731111 (JAYANAGARY 9972851111 (VITAVANAGAR) 9001947144/1NDIRANAGAR) DOCUMENT OF _ARADI of Explain different Types oF addaessing modes wolTh_an exam ple _fox_each es etn CS ned) CRefes class NoTes) whot 1s meant by ossemble, disectives? Exploin K wiTh —_exomples. oO ie exon Bote Assembler is a soProase That is \ a conves ting, -Kobject Paogzam J. an aasembly evel paogzam To binas Tn a Program, There will *K insTauctions ¢ assernb)es disectiver. Assembler digectives 02 ae jnétay cTions given To assembly PAocess in assembler 7 cha OVE a Pasticulay woy TPR the assembled Vi mz To ConvaT assembly progrom iT has To Know To objet im, @ How e AntexpseT “the names e to place The insTauctions \n ‘the memory « @ where - To place dato. operands in The memory lex diAecTives axe used. Fon “There puspose assem DATAWORD , RESERVE . RETURN, ex. EQvU, ORIGIN , \ END | This Notes is valid * only for the duration * Jan-2014 to Dec-2014 9845642144 (MALLESHWARAM) 9972731111 GAYANAGAR) 9972861311 pvrtAVanaren DOCUMENT OF _ARADHYA TUTORIALS® _R/GHTS RESERVED time paeagel The €@u assembler disective infoams The ascembies wherea pasticulas vasioble in memosy. _ ms at gorar ott geaoattet cman &x Sum EQv 200 The ORIGIN oasembles dinective informs The assemble; where To place datablock Thet follows it. 6x OR) GIN 204 ayy x The DATAWwoRD is vsed To ey wat value is Tobe i Placed of & Pasticviaa or location . ex N aa \oono 100 [GLASSES ARE ALSO CONDUCTED FOR EC/EEE/IT/TC BRANCH ys SUBJECTS @ ARADHYA TUTORIALS EEE The Reserv fective can be used 8, avi A AeZeU ge cen ‘ain reper blocks OA, dota . SR. NUM) RESERVE 400 This Notes is valid * only for the duration * Jan-2014 to Dec-2014 The END assemblex disective is Uvsed To indicate end of Phogaam » The RETURN ossemblex disective indicote The point of Teamination in pxogzam é :_ARADHYA TUTORIALS® Explain “The _diffesences beTween e no: 3(Ie Stocks + qveves. a STACK Qveve A stocw is LiroLiner in inet ove) dota STAvcTune « of stack, ~ In case one end is fred, vohile The oThey Aiseg & fallh as data axe Pushed + Popped: one poinres i needed TO e Taock oP of Stack - In The Stack This Problem voovid not asise + ‘This Notes is valid + only for the duration * Jan-2014 to Dec-2014 A. queve is Firol Fiast. in fiast out dota st ay oe Dey of queve, ends of a eve move To higher] ddaess as data ase added ot the baci 4 hemoved faom taont: In ‘Tyoo pointless axe needed To keep Txoc: of Too ends af 1 qveve In queve withoor Rather ‘contaol qveve woould Cormtinousiy Thsough De memory po move DOCUMENT OF ARADHYA TUTORIALS® RIGHTS RESERVED This Notes is valid * only for the duration * Jan-2014 to Dec-2014 | When There ase many calle To subtovtine, a sepasote Space is Created foa’ Voaiables of The svbsovtine ThoT is being execoted- It seves as space fox The SubfovTine. “this Known as stack __faame. josite__a__note__on_ stack Fiame. Q = PAivate L004 ss past of stack is Thesetoxe every Stach woold have rat x © stock pointes A AS aN ® Frome pointer . o>) . ) A stack pointer ahoays pos To top of stack. A frome pointes alo a its To. “Top dope Panne. A fsome pointer can teed fon accessing Vasiables . when evea a sebaoomy is called a frame is caeated 4 an The jable possed To subsovtine ane SToxed on Th ne. Usini Pgame pointer + indexed Al ing modes, Aequiaed data can be accessed » \ y (eam poser) —= eri a 9848642144 (MALLESHWARAM) 9972731111 GAYANAGAR) 9972851111 (VLTAVANAGAR) oontadstadawnem waza DOCUMENT OF ARADHYA_ TUTORIALS® RIGHTS RESERVED page no: 15 F 5 ec AiPPerent _nsTaveTion foamaTs availoble? “* SS This Notes is valid * only for the duration *| Jan-2014 to Dee-2014 3B add hess insTavction what __aze “The Tnstavuctions Can be ‘CLASSES ARE ALSO CONDUCTED FOR EC/EEE/IT/ TC eattl 2 addtess ins Tavetion 4 addsess insTavetion Q) CRete class Notes fn exomer a note on encoding aS ‘insTaucTi ong - The ‘ingtavélions §woaitTen in Ady pAogzom should be conveated TO binaay ne ea his 1S Known ag encoding : To encode A the below 9iy Ss 7 + 10 +a (2) One-word instruction WwsiTe jnstavelions To binoay one of nmat iS used. LOTS om cai st ot ‘opcode | Source | Dest Other into Memory addess/immediat operand (0) Two-word instruction = opcote | Ri | R/ | Rk | Omerinto (6) Three operand instruction DOCUMENT OF ARADHYA TUTORIALS® RIGHTS RESERVED sane na 1Ghe) T# he instavction is ADD RI, RQ on [shifrR #2, Ro Then one word ineTAvction is sufficient. \@ BITS Ba opeode , T bits fon sovsce 4 des aay opesand 4 bits fa addaessing mode 4 10, BiES) “fos oheg info: or \¥ Howeves if The insTAvclion \ involves Absolute addressing ine > Finely if i Ns ingtauction involvég 3 operands like as Add Ri, Rg, Rg Thaee opesond net ae be used. This Notes is valid * only for the-duration * to Dec-2014 9845642144 (MALLESHWARAM) 9972731111 (JAVANAGAM oaryeerits avers

S-ar putea să vă placă și