0% found this document useful (0 votes)
14 views

SPOS Assignment 2

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
0% found this document useful (0 votes)
14 views

SPOS Assignment 2

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
You are on page 1/ 14
_ Assignment No $-2 a : 7 4. Expletn the _psacess of _Allexalton of flow Sion ae Ae anheg ey fn Son = Blasgeel aces Tel ries pesrat. mot conde ol anal a, Sse rasquente oat macro. eer a _—_4h machine. tashmucltons 4h a4 appear in | expansion of macxo__cal) py © Flow of con angion axe can__be arb das us 2 " (2) Cond? Non cancl’ Pseudo =o cade ATE. _(2) Unconditional branch Ps eu: a= speode_ AGO. ° AIF is amilaw jo IE ha Jement_, dhe me _ used far hatanching i known as equencing- _ | cymbal. 3 agg gg gil a Cosdiriany staing > — —2—AGO_is sila to _GOTO_stah Jement. _ An ATE elalement has the. a Ee Aes —~2.An_ AGO. ‘slalement has: the e_synkoo_2 a aioe “ Sequencing syenbal. > — ‘le —saausing dhe usage 2 ALE, AGO ee _sequencina 5 -—gymab bl Ts shown eifn be) Jow — [a MACRO. vary © count, PARGt—: ate _C IT EQ 1) ONCE L ALE _Cg-COUNT EQ 2) + TWICE AIF Cre COUNT vEQ -3.)- THRE CE AGO FINAL | ONCE _MovER _AREG 5X: AD® AREG., d-nrat AGO_- FINAL “TWICE. movER— AREG,X% ADD AREG ,& ARGL LADD _AREGLs “GARG: AGO -FINAL -TRRLCE mover AREG1, X ADD PREG, L ADD _AREG_, FARGL ADD _AREG_, GARG FINAL MEND — | Fig “A maczo with condtHonal expanston o | Ta_this macso, the number af insta ° generate ing expansion _wi}] depen “They help §n__twansfea_of contwol_ 4 expansion of 4he macro. ° || Naxfous cases of ‘macto-.expansion_az she value of She paxomeler & count ONCE, TWICE and__THRICE arse sequencin _ sya A ucd fans __ ont _— to eo eee 4 - haesio cal) Expanded couzre Tota tunevay [inourr. aera x _— ADD peen.¥ VARY 9244 | mouse neem y as - LADD ARER Y | - ! ADD. PREG, ¥ —3.lvary 3.7 | myer pera y — + £ LADD AREtr, Yo Tb — ! | ADD. AREG, ¥ af BREG . = ° ATE and 9G O_stalementa den ot appeay in | the expand oumce ATE and Aso slatemen-. 4s___esn4zo|_she sequence in which the _ ———macxo_pxacess ox expands dhe _slatement s 2 during expansion °__Sequencini inet appease tn the = Been pp — ta opp a Jatin the pxaceas sof mmarea. expansfon with -~wselevant data _stxuctures ~~? Each call 40-9 -macso__is_xepla ced —by is ee _ 2s det oe ody Xd using —seplacement actual parameter. Lis. ‘usel? —tn_place of _foxmal__parameter poe ae a es ~—2._ During macso expansion. ,each__sla ement: tas? ~~ the body of “the _macso_is_ picked _up_ one —by-one = sequentially. en | Each. ess tieaile thal ees ene 0) —Alra_ oxdinawy sting. _5odhich. gs / copied os e 3 38 dustog expan: ron, Z C2) hie mome!_af a fooral seme oli arene oh -déd by + the chara chore Gy? a Dusins maceo. sfon__an slips shying 2 Ue Leolained chan any fon. J Eoemal poxarnetems . cat = (ie Sf sceplaced by the— ac: ° Consident_-a__matso_a given. rochelaa Ayu MACRO TNCR & VARIABLE gavee sy, guseeeg—— = MOVER 4 USE REG, ¢ VPRTABLE “AOD Huse REG 5 INR BY Ls} mover 4 Usk REG» 6 9A apple ___}_— _F5 AL rmacso--deffattions: 1 Nome of thie macro me siiuea 00 ~>posttion ee yet) VARTABLE (2) “INCR-BY (3) “USE REG bees) re - | he bs te ins__ hee —— city ~-shatements ae Eaves ‘Constlex ae segema. ef n009 — deffattion _&- ynacrra — fi a givens iquee. _—}—_MovVER____ Gus E_ReGs se slimenps | START joo | READ TINCR @VARIABLE , GINCR_8Y., 4 USE_REG, > § VARIABLE — ADD. BUBEREG, & INCRBY —MoveE Mm _ ty USE.REG,. & VARIABLE | INcR Ys ARE | eprint —." STOP. ee SGD Ge de _ Fare 4 — | Noms 4 — eth any, Aa_assembl y— progsam with macro. © The macxo psocesson wil) proce 3 dhe praqsarn —___aiven__in__above _fiquxe ts explained below. —__t1) The _slalement Start_teo wil) be copied — -as_ ft fo. —___(2) The_slalement_ READ-x will be capied as 3h is . ——__¢3) The sdafemen} READ ¥- all be copied as_it is, (0) “The statement! Inca_x;¥,AREG ts a: cal) ~~ macxo_ “The maceo_INCR wil) be. expande owe: here Values of the — —____Forma]_ Soma) --pavameless. avametes — Toclual_ “pavametens_ Sar aoa rae ant _ fosmal pasar pegs [raver G05, VARIABLE [eipnsiog| MOVER ARE [ \ * =a ADP _AREG, Y | —|.¢8>_ Remaining — Se ee PRINT X | STOP. xX Ds 4 1 i) _ ull es welatnad tothe a [The output of maceo process ox 16 an -expanded— SSS +P gan bi ah es cn calllectantoa e—outpu tout *s—sheuln ia _bela uw) —Figuse = START. too READ» 3k READ. be MOVER. ARES, xX Juss. ADD PREG; |INCR X.Y, AREGr MOVER _AREGL, X ——' 19s expanded here PRINT xX. Stop. | ci Pxpaoded ; code ~ b END. sen} phases of Compt en. - : Scanning ae cl CLexical celia fein | — L —— | : Passing. Schl: ta TT eagatan Analysis | | ! = Symbol table, — | Eons emani. alysis othen 4 { ! |= tables sulin dee E. Code >Generatoy. Fh Fig. gees ee OPE an = me Scanning Chesca Analysis) 2 - [hte elfmed 4 ok aaa a ugge ring) be- a — validated | ton tak fgamat an pasapien a call led 0 cl ale ool peruera ~~ Th the scanning 9-phase each. word of s}ring ts —validaded ge thsliled moths —caley iy —~srecorded ?nto _suitabl aie heads! ~~ ~ereated into an fndewmedate A aspatta a ia 2 L_ source text — pry tate _ sear ent fox aged adored at etal

You might also like