You are on page 1of 78
ous pny oF the SoKG anerupracess applicable to a yy anion tks mein om em comping in tne ao afious pins and their functions, ‘ Relevant Program Outcomes (PO: POL: Basie knowlede ae POX Discipline knowledge POIO- Lite-long Fearing Pons raze proram ein 6 “This practical is expected to develop the foe Tr Menthe fnction of given png nen 2 ei he fneton oF ns a onion and Course Outcomes) w iyze the fumetional block diagram of S086, Fe Identify the various pins ofthe given microprocessor VE Relevant Affective Domain related © Mh Follow precautionary measutes, bh Demonstrate wor © Follow ethical pr kground 16-bit HMOS microprocessor av FSIS consists of and offered in three Yess Vil Minimum Theoretieat The 8086 i Qolts DC. supply. Electronic eiteuitty channel, silicon gate techn {8 MHz) and SOS6-1(10 MHz). The SUSb microprocessor is ‘iruetore is very much use For ble ama 40 pin 1C and works with $ Fmplemented in N. 15 MiLz). 8086- tout the coneept of its principles and Rance Te! micraptocessors given below Tonger used Understanding functioning of other ad “The dOpins of 8086 can be categorize in different group a fa, Address bus bb. Data bus fe. Contsol bus ‘The 4086 has 20-bit address bus, where 16 pins AD-ADss ate multiplexed ale re aad remaing 4 pins are multiplexed stats and ades Hines Ave Soc (data espera an tee operating modes i inna and mains mee The SOS opel pits changes accoing #0 operating meds: In swim ode nal auch as HOLD. HLDA. ALE. RD. WH, MIO. OTR IN Hocniiene cequeleed (Adit S| Anetement | Speeitiontion uintity | erierks Nin | ‘Objet Uf chat Hides Fbleroprescesser Tio | Whichever Mayr nne ase Hilve dhageann, vaibatie NS Obseevintione J avtey Hed ne oF ven Bhan af HOE HH Fespective minder MIN MODE MAX MODE a vee Mhcela 4 tooled Pltxed OW iS byte, (On ANY y dol of fOr 3 oo Bu2 100 pA ¢ Yh. rarey) TA nenny f Pir Maurashtia State Board of Leelnaeal Education rece aoe a - “ nt VES. re 3a act igual ines eeeeaeea ow high), ALAS.dckIVe. Loon. sanp of suutents se different pis An more pages tf needed) {Space for answers} DSRS Se... dhGr.. SANS. Signals TIES, .SKAMS. S\gnols...Slooo AG. AYP.0f ovalton loding...cagvied..out...by. dhe. processor £6 nbtcl...log dhe ‘4 ‘pub. conkaniier..82.98..bo..jenecalt..olt MeANAY..O%-LLO C623... ontaal... Ag) ; gabee. Signel..peome. Gatlue.dard e Jaen, Pecnloud Taye... semoning..ochicrn..duning 7.8 42 of.dhe..wzene Sete... ane r Che Stohs...fae2.Lingd..026. emClocs.cd, 9dr. 5y,..S).-S0. stohs. On Onfeiseoot acknocd\celg.c. Dee Din. op f0.26.00.. oP Technical Edveation Maharashiea State Boar 3 7 ; pt p Fools and t i netical Ne o Agsembly language Programming, Panctinn, 3 1 Practival Significance Assembly language is used fo write prognine ite the fori af minentonis thar ia ny tion add and operands, which my be regi memory Tocation, In eperating system, system progam ts nocnally writes usin tools Hike assembler, linker anid for debugging dchuyo, assembly lang : Hence, students will be able to use various such tools required for assembly lang, Propramminy, Me Retevane Outcomes (POs) PO2- Discipline knowledge POS. Experiments and practice nye Tools uw Heteney and Practical Skilly “Develop assembly language program using 8086" «il W expected to develop the followin: skills 1 Useleditot to write assembly language program fifenameasm file 2 Us blet and linker to create filename.exe fil 4. Use debugger in single step mode to locate/trace the errors and correcting the Ww Course Outcome(s) assembly Langue programming tools V Keomes, Use the assembly ta lage programming tools and functions, VI Relevant Affective Domain Related O onstrate working as a leader /a team member ©. Follow ethical practices. vu Backsround editor is a program, which is used to construct assembly langus nin appropriate format so that the assembler will translate it correctly: to machine Ia e. Therefore, you can type your program called as source program # editor. The DOS based editor such as EDIT ean be used to type your program. Maharashtra State Board of Technical Fuucation ‘once the asscinbly Tangy fhe dirmand prompt and press Enter Key to create 2g Type link filename obj wr tink fer itedoone - qo eeate filename ve file Finally. type webu filename exe 1 td filename eve press Eater Key to bu your peogsam step by step me 08 command prep Jy Observe the contents of registers, emery location wsed ads cay resources used (Additional oan RS A ie se gen Fasm... YerSion 14 EdD... IAS...D0S TAKE... ELI, delugga. DUNK. xn Observations t) Observe and write the contents of Register wsing debupser TD cr Mrogran is ereated. then type sas fem fie prom : ‘Table 1: Contents of Registers [__ Registers [Flag R General Purpose | AX ]OOGO 3 registers BX | G0 06. es &XJo606 [DX [igo | Overiion Fla —— index Register |_SI_[pgoo | Panty Flag [BIT 600 | Amnitian Cary Fl [Base Pomer | BP[oqo o | Intemint Fis 2 [Stack Poimier [SP qq 0.0 | _Dieston Fa 4 [SeementRezster [DS 39D = | SE ss [ua Re | : | cs ye hv | t LY = = 2) Observe and write the contents of memory Tecation in Code S: TD or Debu “Table 2: Contents of memory location in Code Sezment Address Contents Address | Contents C000 | Be Bb US CSA008, S000 7 C0009 S002 = CSOM0A ¢s.0003 | g EPS Town “$:0004 = | csc | Sams 1G ASTO0 Toso 3) Observe und write the contents of memory lo TD or Debug ‘Table 3; Contents of memory location in Data rata] tdress Contents ~>) tre 1008 TEP. ra ERE DS.0009, fol DS.000A ear] 0004 S005 XIV Practical related Questions siven are few sample questions for reference. Teachers must design mare suc questians ta ensure the achievement of identified CO. 1 Wine thesenbty lamenunxe sols used in your lib iit Table 4 fi © created by th i ar } y ONG. cn Blo mbler wet, dhe. ene Used exe ba ise ELIE. 3 oy the files extensions that are ep toy hank se dhe, pile, exyension Shab Ove Gealeol. bd Vink K SAaoe Maharashira State B. 0 Practical No. 3: Write an assembly language PFORFAN 10 Perfor, and subtraction of two 8 and L6-bit numbers iy, 1 Practicat Significance Xo high-level Language programming, the mathematical SM NOT Aditi, jibetstion (-) can he wed te perform acithmetic operation However, in! faaguage the mnemnies are used to perform arithmetic operation such ADD yy" ehition, SUB'SRES for subtraction. In op iting system, system progran, tisice drivers, memory management modules one normally written jy, language where addition and subtraction te Fequired, Hence, students wilt po “Ss mmacmonics of the tastructions in assembly language program, : NU Retevant Program Outcomes (POs) POT Baste knowledge: PO 2. Disciptine knowlalge PO 3. Experiments and practice PO 4. Engineering tools ML Competency and Shits {DeveloH assembly tansnage program using S086” “ FESENSE SApesredina isestop te Yollowine skitle be Use edtod fo create assembly language program ie. asm file 2 u ‘mbler and tinker to create .exe file X. Use dcbugger in single step mode te locare'trace the errors and correcting the TW Relevant Course Ourcome(s) 2 Wite assembly V Practical Ourcomes a Wri fen 8 and 16 bit numbers, & Wr hwo given S and 16-bit NT Relevant Affective Domain Re a Follow pre » Demo: VU Minimem Theoretical Background ADD ADC destination, source number from source to a number from destination. The ult of addition. The source may be an into the ry location as specified by any 24 addressi ster oF a memory. The source and emory locations. Destination should not flay Ka, tage Hi, A HE a Ta te command prompted pees Ene Rex {QSAR Migea gn: Type steak flere abn ge tink Rerasie: ip sonia ‘o.create fifenamue cre he. a: Finally, type debuas figname te ao el lengme.cay: ou ‘He Somme, Press enter Key to deiiug sour povgraun wRD OX sles Py fh. Observe the guatents. AL TEgIBLEES, MIRIHVIES IDEUIEN, Yee ging} Si os) Mig, MNES atcenen, ; Oe = TASH, Nun Address CS. 0008 ©5000 sy oma an wits te coment of memo fs ae Oe TD or Deb - Tale 3 Cantents memory eaton in aL ‘Contents, ‘Address Contents | Fi eee} semana TN? OEE! bem Ee Ue soon (29 %5 5% EL DEO |} ps:0002_ DS:000A. —_—_—~.- DS:0003 DS:0008 ‘DpS:0004 DS:000C Pre BSNS psa | ; ii ‘DS:0006 1DS:000F “| < ps0 pear ce eoriaeaeel —+ program Code with comments - Maharashara State Hoard of Techaical pe alr R09, XV Results (Output of the Program) (Notes A Of NO. 2b a Sa eet Fem sample uestions for reference. Teachers must desie rae Mbtieestions toensure the achievement uf idemified C Write the command line w to create assembly Ta and subtietion ; ctTasm bik addi¢ion asm CUTAG I EdIE Swbstradtan.. 35m 1 2 Mite the command line used to generate exe file of assembly language program for addition and subtraction CTA In.7..TLnk addidian Ob, CMTAS AZT NK, Subs trawlbne Obj | Ae seem me Mod... Cad&...c.-.olha af Ol. Ol EMS. siti Eup. Mal ducation - eae EE a 4, Write the © code MOV AL, 99 ADD AL, OL 2, Write an ALP for addition of two ¥2 bx mrmubers (Space for answers) be Loiskex. tal Svad ohe..UNoe..00...d18 cons) RY, EAM eb. ALLO... Ld he ae E abe, addy LLAUB6 7S oeh.ody SARCEROH Mad i 204 in “Mav.a%...90%d.. etr.obe MON...pH- (porch. PAr..Aek OM pA Henronennrner : gwronch..Pbx.ghat, ore : (NOV. HK. dh. PHEX...Cabo.Le- “mov...p9e-L0erd. Phar... Uee..b2. “ararasira State Board ‘F Technical Education moce.<.nou. NES. te ends. and Yogi je Pr Ge xvul Microprocessor (22415) Practical No. 4: Write an ALP to multiply two given 8 and 16 bit UNSigg 1 mm Vv vr vu acta ote and signed numbers. ’ Practical Significance ic In high-level language Programming. the mathematical sign for iP lication a ised to perform arithmetic operation. However, in assembly fanguage the mney,’ are used to perform arithmetic operation such MUL for unsigned ripest IMUL for signed multiplication. In operating system, system Program ar 88 dey, dnwvers. memory management modules are normally written in eae e ane Where addition and subtraction 1s required, Hence, students will be able to use vg instruction for unsigned and IMUL instruction for signed numbers in assens language program, Relevant Program Outcomes (POs) PO 1. Basic knowledge: PO 2. Discipline knowledge! PO 3- Experiments and practice PO 4- Engineering toofg Competeney-and Skills * “Develop assembly language program using 8086" This practical is expected to develop the following skills 1 2 Use assembler and linker to create filenone exe file 5 Use debugger in single step mode to lose Wace the errors and correcting the Relevant Course Outcomes) 3 Use instructions for different addressing mode Practical Outcomes a. Wnite an ALP to multiply two ¢an ALP to multiply two gi bo Wen ven & and 16-bit unsigned numbers “en Band 16-bit signed number, Relevant Affective Domain Related Outcomes a. Follow precautionary measures 5. Demonstrate working as a leader /a team member. Follow ethical practices, Minimum Theoretical Background MUL source MUL 1s used to multi byte'word in the AL/AX register ‘The location: When a byte 16 multiplied wa Decause the result of multiplication ; the word in AX. then the MSW of n “fet because the result of multiplieas of the Fal 8 zero, then CF and OF ba OS resutt in AX. MSH or ssw orient ealle Me Ce eae cate o ovals with care Tnndlic camparter system wed poripherats WHS 2 Shuadiown PC properly Mo Pracefine a iis algorithm and ariw Aowwchat {or ENT program (Use blank provided aratiach more pages Pneesde ) %. Danitileiclik on DOSBON TASM 14 ton, Tene eal iemame.asem on DOS prompt and Press Enter Key & ‘Type the program nnd save on disk : Once the assembly language program is created, then type 128 filerurme ste command prompt and press Enter Key te create Alename.obj file @ Tyne slink filename:ob} or Wink filename fon contmand prompt and press Enter Ke. tw .creme filename exe file. 2. Finally. type dehug Aloname.cxe ot ti filename.exe on the command prompt and press Enter Key 10 debug your program sicp by step. h ‘Observe the coments of registers, memory location used and status of fags. =< Reem er (Additional) S8s cembier . Linke: ] Tho. XII Observations w after the erve and write the coments of Register using debugger TD or Debi 6 Oo = = 200 { GO | Auniliary Ca #86 So L¢ Gao Interrupt Flag a oc0 oaoGs Direction [pry o- Moy Go @_cdaka acca Mav oS AL Mob ax, AWN cc | Win) rust 2 | Mou *%p-\ab .a% | Mov “KB -msb,cloc ends end aE “ Agape (28 xw xv Ube 2) Comtents at mtenvory toeatton An ata Seq Aatdrons, i , Contents | Ades Easton ks lop Yon som fe asoaar bs ES soins bs as Por psn bs onion FE pssoo0t = ps oon ps coons bs 000» 1 DS:0000 Ds.000r 1 ps.o00 Ds ont angramn Coste with comments Results (Output ot rages) (Note: Write an Output of program ass by exch) sw sample questions for referen: more such questio Write the names of result ‘eachery must design ievement of identified CO. jsters of multiplication of 8/16-bits unsigned and sey Micrope 4159 eee 19, 'sder booh che. Se eet Humber West oft 3 fhe Ie, a nse Maule Shorin.. dx. Which instruction you have used to extend the sign of B-bit negative nye. — 2 — ESS TRAN SIS" wy inguchion..to Syeepdls.. dhe, — S19n,.00.3, bit. rpgatue na.2. pcb, bid : imaldipleater ita sete Exercis a (Useblank space provide or answer or aached more pages if nededy 1 Write the content of AX register after execution of following code = MOV BL, -1 — MOV AL.I IMUL BL a | 2. State the flag affected by IMUL instruction. ond 3. State the difference between MUL and IMUL. a (Space for answers) a The logs, OP RAR. by Trnul Tnsbuclion, Seen a _SP cap Of. DAE POPE Mictop u mm vt vil ies ey Nav Ss Write am ALE to perform Mtock transfer operation Practica! Skzrificamce Ih spcncing ssw. omgenent eats a riko ah Seb masked wee NN NOW maraaie Reda canna ee NT a D ROETAME HAE AG Ute denies atavern, meme mally wren a assewntty Language whore aeannnry Hoek ly 4 Relevant Program Outcomes (POs) PO t- Basic knowtadge PO 2: Disciptine knowiedge PO 3- Experiments and practice PO 4- Engineering tools practice ‘Competency and Skills “Develop assembly language program using S080” This practical is expected tgidey lop the following Skills 1, Use editor to create asserably anne 2. Use assembler and linker to erate 3. Use debugger in single step madte to locate race the errors and correcting the errors RK Sade TY Relevant Course Outcome(s) 2. Use instructions for different adie: ing mode. Practical Outcomes a. Writean ALP to perform block transfer lata usitis string instructions a b. Write an ALP to perform block transfer data without wsing string instructions Relevant Affective Domain Related Outeomes ‘a. Follow precautionary measure: b. Demonstrate working as a leader / a team member <. Follow ethical practices. imum Theoretical Background Block transfer operation is nothing but itis transferring of block of date from somes memory locations to destination memory Locations, Connter is reqiined 49 perform block transfer operation which is equal to length of data block, On each twanster of - da from source to destination counter must be decremented by one and wemory pointer must be incremented by one or two depending on byte oF word tanyster, This process is repeated till the counter becomes Ze rive Res comput of yoache”) related Questions » questions for reference, Te, xvi Pentel ‘pelow giver are few sample ql eid Below 8! ye the achievement of identified Co, uu have used [0 initialize Memory pointe, oO Write the inst i ne on dal i destination Move mnou-ck 2, State the name of register whi ‘albu sd Gi Ry seer Se eet XVIL_ Exercise (Any One) (Use blank space provided for answers or attach more pages if needed 1. Write an ALP to perform block transfer in reverse order. 2. Write an ALP to perform block transfer of overlapping block. (Space for answers) “model. “Small. ABO | Boe a one. ay. NDS Ul (92518 Hy 789.4 H tod mnay_ofs.O.daks ot dr,.at. ork... oMSg.db.JO1SL04% Sx. Ab. b.OBh dis ple). dest.db.rd.n.gyoe?.lo} dE. 9.2. mou. & cleta. MAL, OD oe .Q- Sh we ACO..d.¢ OP. MOU. mas nak wd MCSE fne.ink _ANP.BMS I odd.dl,.0... Oe... aca WK.0Y Cenk... mMav..Cet dts i AEC AS V2. ASE. SESI% Marc mb-;At us ML.AS..¢NT. mov.ch.0eh, Une..dahd. Ans loov.uf. end and Mio, u ut Vv vu £ Write a ATA to ative tooo a bit aged tyoee HO bt tunsigned ond signed nn iioanee Hangin ptotrananing the 4 Wn) Hower athon auch, DW for ssign practical Si ty bg peeform ananette np gutta ap werent modules are normally wen mn re division 07 finsigned and IDIV instruction for signed number Relevant Program Outcontes (POs) PO 1, Basie knowledge: PO 2- Discipline knowledge PO 3 Experiments and practice PO 4- Engineering tools prictice Competency and Skills “Develop assembly language program using S086" This practical is expected to develop the following skills 1, Use editor to create aysembly 2. Use assembler and linker tw ereate ser in single step mode to locate tee Ayrtage progeny filename (he Wty hd GL eeuiny th Use debug errors Relevant Course Outcome(s) fa. Use instructions for different addressing mode. Practical Outcomes a. Write an ALP to divide two unsigned numbers b. Write an ALP to divide two signed numbers Relevant Affective Domain Related Out 1. Follow precautionary measures b. Demonstrate working as a leader / team member ¢. Follow ethical practice Minimum Theoretical Background DIV source DIVADIV instruction divides an unsigned/signed word by on unsigned/signed byte during 16/8 division, and to divide unsigmed/signed double word te 32-bits by an unsigned signed word during 32/16 division, The worl (tivated) ynust he an the AN register and a byte (divisor) may in any 8-bit register oF memory Tocation uate the division of a word by a byte, After the division, 8 bit quotient will be stored in ML ster and 8 bit remainder will stored in ALL tegistet ion w xu NUL Observations oS pn. Table 1: Contents of Registers T Flag Register las Ae I Carry Flag CF TO) | Dogo I Zero Flag ZF |g | ioodo I ‘Sign Flag SF b Laaoe I Overflow Flag OF b [0008 | Parity Flag PFO | | 6000 | Auxiliary Cary Flag | AF [9 | C800 boo" [ Interrupt Flag IF {i Ose | Direction Flag [ore provaded of attach more pages if needed) '& Dandie elik on DOSBON TASM 1.4 icon. Type 28 Bkmame.aem on DOS prompt and pre: SL. Type the program and save on disk . Onwe the assombly language program is created, then type /49 filenany, the connmand prompt and press Enter Key to create filename.oby file oon command prompt and press fy. mer Key © Bype vieak emai obj or tink filename name cre file 8 iy. ype dedneg Alename.cxe or 1d filename.exe on the command prom, sur program step by step. to debny . cation used and status of flags ters, memory 10% ¥ SOMERS eS do OSsember_ = TAS M.. Uke TTS rebagger ) Odserve end wpite the contents of Register using debugger TD or Debug afier ters ntents of memory location in Dat, ‘shle 2: Contents of memory location in Data 1 Pmganam__ te Uae Te pe ene, Sina] _———— So dividend old oof Pere —————— dinSor dw ary : Que dus oO | edrmder deo 9 Code Move. co @ “cake Map dowd Moura _trorel Pto-diutson div duigar - Ou _Ava, : aa. Mou 27m doe ends en: reece costo a.) | ae mode} Se EEE Auld clata. dividend ely 129 divisor chp aA £2 cub ‘©. Cache mace, ax © daks ne ___MNAV_aS, AN ; Man ant gtxidenc Ce lig) heed WW elegamiaanyt ulanais y Mouguo, a) is mov, £om, al - ends eral - ———dluidend add =\28U5H- dips on doy al a Tio dy 0 — Lem diy _o ‘ lode Mous, Oo @ dale ~ mou ao Moon, derd. Plr=dividencl Mhou_dx_word eby- divider eliv_divison Mou duo 4X, Ne, Ty, Se “ps0 DS.0008 t NIV. Program Code with com ee. XV Results (Output of Program) (Note: Write an Output of program as tea 8 ag consi ye -.69000.29 BAULIO... ONS Geen 229. U : am nei (C3 ers Sa acet Peer 02. Board of Tee : guertlons fr reference, unievement of token i "Dey sy IA Agndls. di 44510 O1GBM J, 1) 16) = eat LIDIY ipstruction,, 2 aneteypaTe ays. GMA, yg ‘ 7 on hoicte! Syne. 10. ANVIL Fyereige (ny One) (Use blank space provided for answers oF attach more pages if needy) 1 Wittean ALP todlivide 8-bit signed Humber by 8-bit signed mumps, 2. Write an ALP to div it signed number by 16-bit Signed iuy, ‘Space for nswers) ..madel.. small. FAT. a snad a divided do...204 Asa db. LOH. 3 eee eae MU. d.X. O..de0... MOU Akar. 700.44, dividenk eh), idiv. divisor” ends, ef) ., Maharashtia State Board of Vechnical Education * Tey, ified @ethey, ‘Maharashtra State rneded.. small chat alySlon..ca.... \22hta AWW {Siol..dwd..-.00het Ahd....0 9en..L0...6 de... mov..248..0..daks. ANAS. Bn mow 3% clividlend. 2h. diy. dlunsax. 10.04..qU0-« QoL. FX QN ARID. BH ber, Maharashtra State Board of Te person (22415) ical No. 8: Write an ALP to perforn c Wille dn ALP to perform arithmette ope practical Significance Prageh-level language programming, decimal numb In ietre operation. However, mictoproce jcroprocessor performs all aithistic sy sl mann n ars bso apc s re eure conver arnt operation est of ‘eetmal nunnbers 10 appror ie FEANIBCD format. Hence, students will be able to used DAA and DAS ACT esl form arithmetic operation on decimal (BCD) sumnbers in assembly [anEWES gsc to perform operation s system is U program. elevant Program Outcomes (POs) pO 1. Basic knowledge: 20 2- Discipline knowledge 29 3- Experiments and practice 20 4- Engineering tools practice ompetency and Skills Develop assembly language program using 8086" this practical is expected to develop the following skills |. Use editor to create assembly Ianguage program filenam ). Use assembler and linker to create filename.exe fle Use debugger in single step mode to foeate'trace the errors and cOrrestNS the errors clevant Course Outcome(s) Develop assembly language program using assembler ractical Outcomes Write an ALP to add, subtract, multiply. divide two BCD numb elevant Affective Domain Related Outcomes Follow precautionary measures. * Demonstrate working as a leader / a team member: Follow ethical practices. inimum Theoretical Background AA (Decimal adjust accumulator) A insruction is used to convert the result of the adgition of two packed BCD abe into s packed BCD number. DAA only works on AL register. So, DAA aoe on should be used after the ADD/ADC instruction. The ADD/ADC instruction lds the two BCD number in hexadecimal format and DAA ti -xadecimal result to BCD result ag affected: CF, PF. AF. SF. ZF and OF is undefined. ruction con’ fa State Board of Technical Education LE POE Por Bed addigt O0——— —Made|_smal{ + ____—— aagram | for Beal mold Phica dor) 7 madel_small amt abla name db ‘st mst XS -mMSh aus i fede. ; __mok on Od haba ee tS Moan ch NOM ee __ yer Reece Type dink fk te create flename .¢ ig Finally. pres hy Observe the cont vanes cesungegs used (Addition wo Sear ASsMver. = TfiSm, UA Ker. TWEME, Repoagen..1M.. KIL Observations OF Hink filename on cormmand prompt and BS Menam : 1e-exe oF td filename. exe on the command POM fer Key t0 debug your program step by step. : of registers, memory location used and ger TD or Debug after *HE 1) Observe and write the contents of Register using debuss execution of program, ‘Table 1: Contents of Registers, f= Registers ES After Before art c§hToa00 * $0.04 060 cx [0000 Toasa [ex Teco [ae 60 SI [Qo |qaas _| Di |og 60 | o006 | Tgqnd looao 009 | Auxiliary Camry Flee | interrapt Flag | 2) Observe and write the execution of program ‘contents of memor ry location in Data Segm ‘Table 2: Contents of memory local eee [Address Contents [_DS:0000 he CP e DS:0001 [-_Ds:0002 ps.0003__—| DS.0004 “DS-0005 | DS:000F Seats Site Board of Technical Education AW Risntn Ontpat af Progeaey mine Wave an Ouitpat ef py t XV Practical vetated Questiany dow given are few sample questions for refers Sourhers s nanre the achievement of identified CO. Huda hoquestions to en Shy 8CD) ee Kod, PY ne ctions that converts the 1 Wone the instr unpacked decimal digits Addision -> DAY. winradtan -) ORS XVIL_ Exercise (Question 2 and 3 are compulsory and 1 is optional) ach more pages if 0 BCD numbers stor manent i file SSH DA sramnttnn th AV pices ut ful oante afer he SATS HATING sana ah ag AY wo Mov mont AWN tt wy AWA BH AUIS IVAN tnstineon tm AD ent S Seeiein ah 0h the sone SENT and At CET sewn on SUB AL Dan Spee Tor answers) QW APYVaz2 oy 4 PLIYW jada e Ax = Rpt ord. Riplone Wo ld NBG... S.,..aNe. . mad b).,.agn MDV.Tq BM ooo wy. AL; Oe ‘Mahrashir staoqnerenn 22018) 0, 10: Write a ALM to find sanattestita oF n aumber actical Siguitieatice bly language programming, flags ave affected after compate sms ' aus af the Hats ean be scat " make decision about smaller Sunt will be able se compare instruction ant des sesom 2 somal and largest number clevant Prageatn Outcomes (POs NFO Basie bromtedge: nn TO” PO2- Discipline knowledge PO. Experiments an practice PO 4: Engineering tools Competency and Skills m “Develop assembly language program using S086 ‘This practical is expected to develop the following skills a. Use editor to ctea age program filename asm file > b. Use assembler and linker to cteate filename file © Use debugger IV Relevant Course Outcome(s) Develop an assembly ta V Practical Outcomes a. Write an ALP to find smallest number from an array’ of » numbers bb. Write am ALP to find largest number from an array of n numbers VI Relevant Affective Domain Related Outcomes a. Follow precautionary measures. b. Demonstrate working as a leader / team member &. Follow ethical practices vu al Background i.e, byte or word, Hence, memory pointer and counter is Array is the set of N number required to read or write numbers from oF to memory location in the array ber from the he numbers in the array must be consist of & bit numbers ie. byte or 16 bit is required to read numbers from the array To find smallest/largest nu compared with each other, Array ma numbers ic. word, so memory poi ‘Also, one counter called ats byte or word counter which indicates how many numbers are there in the array, is required in the program tw read and compare only desired numbers from the array. In 8086, the CMP instruction is used to compare two numeric data fields. CMP destination, sou The CMP instruction compares & wf destination, The sour byte/word from the specitied source and a byte word nd destination can be an inunediate data, 2 from the speci ol ie Board of Fechnical Education Ny area ee: . \ LOGINS mMoleo b ALM & model smay me qu (sp JG _nex eb ee NeXt Ss nang ® XH Resources sured Cadaitonal) XI Observations i) Habarsctuce State Board of Technica Education soxions to be followed crema computer systein and peripherals with care shut derwn PC properly jure Merite algorithm and draw flowchart for given program (Lise blank sce provided ‘or attach more pages if needed) ‘Double clik on DOSBOX TASM 1.4 icon a Tepe edit filename.asm on DOS prompt and press Fnter Key Type the program and save on disk, Cree he assembly language program is ercafed, then tye fasm filename 2S ont command prompt and press Enter Key to create filenam Type dlink filenanse.obj or tink filename on eorsunansd promPt x0 create filename exe file. Finally. type debug filename exe OF tl filemame exe press Enter Key to debug Your program step By step. Pipecrve the contents of registers, memory location uved and tats oF tags the obj file ‘and press Enter Key S on te/Gdimimtand prompe and 7... 99.9. Soe CTO... Ssombies.....AS10. Behogger. KO ‘Observe und write the contents of memory location and AL register after the execution of program register while finding smatte able {: Contents of memory location and AL stn 2) Observe and write the contents of memory location and AL register aj, ‘execution of program. able 2: Contents of memory location and Ab register while finding largest nun, Original dldress | Oris | cena sooo 7 2 Program Code with comments practical rel ‘Nowe Beto given ure fo samp que more such questions ensure tne at 1 Which Mags are affected by aid floss e i reference, Teachers must Se of identified CO. LarucH on, Cade 2. Which instructions are used to 7 ae ed to make decision to fiid small AVE. Exercise (Use blank space provided for answers or attach more pas 1. Show flag status after con nt | na MENG cr | Zi 23 [8 >) ilo 73 | 8 r lO __| 100 [100 2. Write syntax of CMP instruction with suitable example 3. Which condition jump instructions are used to find largest and smallest num DOMEK. LIOR. Ble OPP oes tom Qore..ALL.Somk...dramed ihe. A Mbeb Micrsyoncwenen (73816) D 3c tS Jump with cary. istration E to Pind. Smalled “nies dts UNC IS Gump With no. Cay. is “Aad ts Pind che. loogeat number ZF no aory qeacwed chen. ab Sd rHon $240k. than’ sowre Dine ol Practical u Mm Ww MI Vu ssembly Language prog! + Write an assembl) age p oa i satendl g/des ending order Sonn ic emoeess that organizes a collection of data “inte Sorting is a’ proces E Mo Bearer Satta This operation requires comp rscending order comparison. Thete sare descend f data depending on result of compa Ve ¢ position of da be Moy 7 se NCHG sorting data, Students will be able to use or) implementing sorting algorithms Relevant Program Outcomes (POs) PO 1. Basic knowledge: PO 2- Discipline knowledge PO 3- Experiments and practice PO 4- Engineering tools Competency and Ski ee “Develop assembly language program using SOS6 This practical is expected to develop the following)skills a Use editortd create assembly Tangnage PRBFAN Filename asm file b. Use assenblerandtinker to create filename exe file © Use debugger in single step mode to locate trace the errors and cogs errors Relevant Course Outcomes) 4 Develop an assembly’ lan Tam using assembler Practical Outcomes 2 Nit an ALP to arrange numbers in an array MM ascending order mean ALP to arrange numbers nan array in descending order Relevant Affective Domain Related Outcome a Follow Precautionary Measures ce b. Demonstrate working aS a leader © Follow ethical practices : Minimum Theareticgy Backgroy id he: : eran Uf numbers in an array are arrange ember then that aay see 7 NBed s that every n't Dumber is gy order. There are many ® SOM, Merge Sort, Q, compan number“ cry tenets inv} NUON Operation 4 PME Humbe METS involves diff mn Operation ependin., i * destinag. at every n™ number Is g rer. If number in an array umber, then that array is as Selection Sort, Insert rent oper Oe OA b cn Tpaat sy cenearnnemn 1p 1 the exer rvntians jocation after ioe weite the eontenitn of mierary fl ending order Valle 1 Contents ot memory tneation Hn ee Hb OF oy WO Miag ae raved Vasa | Poy Nadie) "Gitgin | Pave | Rae] ane —_ j | Contents 64. | 97 i Dsoaon | yy 7 pee | Dany 0 v2. va } 37 « | DS -d00, Jal \B. | Dso00% | i i Dsroo0a ap L225. i “ 1100 OF preee, 2) Observe and write the content of memory location after the SXECUTION Of prog, ‘Table 2: Contents OF memory location fry descending order Weration | Address ] Original | Pays } Fie tesco oxo $8 [ovomn | LUO a ! be | Ds 2s | DS 0008 [a 2b. LDS:000¢"] “gp XW Program ¢ “ode With comments Pa pamm_ oscenting ard) Mad El _smolt_ data ———— Waa abe ———CO7AY also AW ,o2if.. AH, 1g, oh man S)_vpset cory St MG Ox, be eee Pangan dekee(ng. andes Wetteran 0 lake _ Q}.dU VEN ST ABH, LEH, oft! ole aes MEL ay O lala ae MALL AS, GOL ices - MCW pot, ZS ee UPd. a> ee Mav St, Qpe(Belnooral vice A maw.on, DRO V ; Wy co ee Mav aoe, C81) sce ae 77 ee emf aoc tsh2) | dye de. : exchy.aoe Cai pa anSiit © 0CCh})..a% 051) ae Ans dcd. sip Q (oop uf cleo, dyeup! setae wo CNIS. : ond. d ee Micro XV Results (Output of the Pr (Note: Wate an Ouiput of p signed byt feeding order.o1P..GAy TH, 12H, 1g, ot descending ode. Pall AH Vai, 1H, 3H XVI Practical related Questions Note: Below given are few sample questions for reference. Teachers must desis more such questions to ensure the achievement of idemified CO. ane veh use, (364s i insu your prorat Or, Of. SLR a ini ioe don Botan anand £44 2, Which sort Igorithm is used in your program? babble. soot IS used Pox. So lag..pm gro XVI Exercise sages if needed) ,09H.10H1.061, write the array contents in each nding order LOGH, write the array contents in each onder. Addie oxeray 02 BOG 10.06 pass... 2 ODOT 9 OG V8 Yo Jin ie i <= WEEN Pass (00 DG tt oye one PODS a enn Wann OK. A] “Poss 5 6 66 OF | O97 NG 85" is Airanpineesstt F veto Nahe Practical Nit ion n a nv VE vu tas HaenaZe PEAR TO Ting snily nant cay axel MOE eyi ee: ae A xteing, arrange ACCT ng enon arnt SEF ings anne vse HE Gales Wh varias 4), ve “ne OF aE seareh parlicilin | String ie a a poses 14 wel i frainotors StH oti ignve cy SU (IE ipa Fen User ! ambine diferent SHINES Stade) im gasquenent to ath StH, HEE portion ditterenl ap q Rrotovani Program Ontewmes HO8 OT Base Anowledge: YO S Discipline know ledee PO A Dypormronts and practice: PO: Pheineoring (ols ‘Compotoney and Skills f SPevays aanenbh dencuage program using 8086 This practical Is expeetod to develop the following sills. Use catitor to cteate assembly language program flename.asm file ' 2. Use assembler and linker to create Jlename.eve file, 8 Use debugger i single step mode to locate/race the errors and corre orton Relevant Course Ontcome(s) as Develop an assembly language progrant using assembler Practical Outcomes a Write an ALP to antange stei bo Wate an ALP to find string length Write an ALP to woncatenate two. strings Ht reverse order Relov ant Attective Domain Related Outcomes 4 Follow precautionary measures ; b Demonstrate Work \ ita Ws a leader / a team mes ©. Follow ethical practices ones Minimum 't heoreticoal Background The sting consists op S onsists of either b! In assembly pre “S* sign. The dy Vahte of every For Exaniple aa y CORMAN PROMPL and agienasne exe OO E CODING ord fle / yy step ew Man etl nnd stat k fully, aype ns remary focation « nits orn press Entet vo ale 5 of regintel Key went bh Observe the i nl XU Res rc we SB). a ember. TAS. xu “Tnput string |) Programming Ke. 2 taken | Output string micmPmceys “Avg | Windoc 4? PMHo Ming V4 NIV Progr dels nv comments | model..s 1. eos, Dr, Lang. sick Hoot! |. i Hi og : No.6. spin 19 "ONS inf am Wau ri Mh. Poin, Proce moin te NOU M%. @ Anko fi tthe Hrs OS. AK ; Pass sae pPhoc, 1 CoM VOKSE MON 8, 4 ped Hols tiny dahinashira State Board of HII Ddiatigs the Progen) XV Results COnEPUEY (None: Write an Onan XVE_ Practical related Questions 2, State the role of Le sc shag she using 98 ro MQnk OP As an ep Sake Spor MAhe. og PRG k t 2 trony Question id 27 space provided for a 1 Write an ALP to perform str n ALP to find the st Mode ae oo Ms ae ne eer \s. fatind® String 208 stony \s. nob, Polindyeme’? * 3 & 5 3 zR Vatarashira Se Board of Technical Fdcation GHEE Atmenpanees CME tal! pajinehap mov ats ‘ENT, ait mari Et Palindrend. PM: maest, offset SUNY Loop. men AX (sul ame. Al. TE. LaBELL TNC ST 7 Eme looht (A.ge.01 24a maw DZ, opaer Sin}. DEI Ses VG Looee 2 emp ST, PE. TLoutpak L Mav. AxtsT] tame Al,BL TNE.ourpate DEC ST. Inc. oL TDP loop OudPat 1: CER DX. sbyg4. hou HR Hh 7 TNT. RET OULP UE - Palindoame EN ONE... END, NP men : language program Significance aver if an algorithm is: avait y Signtican plement &¥ " able, fe congis to ipl vndent tisks Which can be ¢, Ae ET ee inde en en ee inten gel ds See vided to amet OMe ie a Ee PFORFANN imo sma and irmplemented, Te Mey is called 8 modular OBEN, Lay, designing them independe dnd segregate errors. A renege more prone to errors ancl itis il as subprogrant oF SMbIOWH NE gp p, instruction in a pt eee aatreise’ OF DrOLTam ¢ s aon programming which perms p M code eee procedure in assembly EMgUAge progran, students will be able to write and use P eran, I Relevant Program Outcomes (POS) PO 1. Basie knowledge PO 2- Discipline knowled: PO 3- Experiments and practice PO 4 Engincering tools practice IT Competeney and Skills “Develop assembly language program using S086” This practical is expected to develop the following skills, 1. Use editor to create assembly language program fi/ename.asm file. ker to create filename.exe file. ngle step mode to locaie/trace the errors and correctin Use assembler and li er i errors. iN Relevant Course Outcome(s) 1. Develop assembly la eige programs using procedures. macros and m omes LP for additi Relevant Affective Domain Related Outcom ‘omes Follow precautionary measun b. Demons: ead Denwonsn ead VIL Minimum Theoretical Back: al Bae! A procedu P ure iS a set of gh and a: mF and reuse again Hor UM from 4 Te the four ste ave jelarn 18 procedure eps that ier to call an yan 1 ore Ghee CRATE PIT . gray: Bt RA CD pik Fil Wee ow file s Yanalt, DY a finan ove Ot jad pipette. ot the Cat tithatt pian gives Pay BEX ja debag Wl! prea abe BY step Mt sg bse He COHN say yeguaters Ne jyany WacatiOn qed HET SHALES OF Hyg Resourses ayod ( Adatirinnal) ey). dlebupeer FD or Debuy afi ape 1 SMMEOIES OF HEBEL Rogiseee™ | LL Hduister | Write the content of Instruction pointes IP before and CALL instruction. What are the advantages of as procedure? teas alae apg li ngelateclante Be. claced. .. development. Bp Sehagging Ceea avinig. HeLoine aecies XVI Exereis a if needed) ers or attach more pag st number from the array of 10 numbers using an ALP to find s procedure, Write an ALP to cour number of ‘T's in S-bit number using pro (Space for answers) 9 model. small colo. eo. WH LH, HAG ISH I6H,IH, 18A Ig Rigo! Smal. cled..0 code. mou.oot @ dab Mov dS. AX @\ Smollesé “MoU. SMoll..90C mou. ah.,4ch 3! a Chr aa / mee oa offset Grroy mn dn: jooP9P mer ed of end ut jeat No. 172 Write an asse i mbly Ae progeam wsing mae LB sing, mac ee lan MABE progr ing at different places ¢ different data of the Pa a ance small programs en : ata t The proce a fy the programming process is kno M ple to use Macro In assembly f wil of defining opt fe program sant Program Outeo a Basic knowledge ine knowledge nes (POs) 70 2- Di po # Experiments and practice oa: Engineering tools practice Competency and Skills Pyap assembly language program using 8086" Jris practical is expectedtto/develop the following Ik Use editor to create assembly langunas srovt embler and linker to cré: ~ DAF ie fe fllename.exe fe. le step mode to locate trace # Relevant Course Outcome(s) fop assembly | amming approuch ALP for addition, subtraction, muluptic MACRO : Write an Writean ALP Relevant Affective Donnan 3. Follow precautionary me h. Demonstrate workin: & Follow ethical practices. Minimum Theoretical Background When assembler encounters a macro associated with the macro name is substitut 2 macro expansion. Hence macro #5 © when its body has a few pr am will be large on account Where macros are used. The directive MACRO ‘kfinition, declarations. or a small part of the Moe-tion of the macro. The macro should be start Sith ENDM directive Syntax ed or expanded at me o we Work ‘Suieantions ‘haxaalts weil deme ane ecu He ase a th gadis separa DAC RMD rete ee ENBAE acta pint Heart? rs aiakeertss geen? Wwe anetrerbe He: use UL ae ented Uuatna seangy CEN eaaleatts ity Tanauage Peet 1 use Ue ascot . eset HN (PHT Hteconntians: co De thiluaved Hiunite computers estonia pertpheral wrth cate vod bx cooley ogy pogrunnttihe LOCI (0 Write rqnnnnin HOOKS THE is Remarks = I. Stuerdiwen BE properly Procedure ee etrte wn aiganttin audi draw Howebart of grvem programe (Lise Dliatek space moreidcel up attaad anne patges iP uceded) + Bonide gt DUSBON, TASM Ed cer ce Pewecift desea: soith oar DOS prompt ant press Enter Key Lo Pepe che pagramand stve ott tisk (ome tke -ssembiy: karngueane program's created then eype tater dlcnaiie goin en fuand prompt and press Enter Koy to create filename obs tile Hips Fiomeumecat 1A herons. on coramand prompLand press Enter Key site Siomume’ eve tile & re rape utidne ffemanne exe or id sfesrame exe on the gammnand prompt ness Key ta debug your progtun step bY step fe Observe the contents af registers memory location used and status of Hays ARysunumces avent | Actlitiornad) ae OPN e awl write tho Contents oF Resister usin, rien Rau # dotuaner TD oF Debug afler the Fable 1 Contents at tepistery Uepisters | ‘s Vlog Register \ _ Aner Retore dane Zev Flay a "| Aga Stew Pay St | ooaq Overflow Play | O00 | | isha Parity Flag | PM OQd0 _Ausilia uty Carry Flay | AL | ~faspe | 9sac Be AD | SAD aur4 _L aoa gy Qbserve and write the contents! of memdiy location, if Baty Segment alter the execution of pr contents of memory location in Data Segment aContente | ES “19 Pg esl, d000 Ds.000 TS.0002 S70003, XV Results (Output of Program) et (Note: Weite an Outpat of program assigned by teache NVI Practical related Questions ; istions for reference. Teachers must design sment of identified CO. more such questions to ensure the achic se oa divantages and disadyanta is maer : Sod Luidh 0. LS. chat. dey. Just “ak he Ee we aa “taretion ® Re acho f ae Can, Kaluuces dIMe Por 2P\o tre. Same, mace “Sb INS de OSIMber dhe. begining ©? - higwaee Th inform dhe..oSsembk. dhe. end. oF VH Exercise (Use blank space provided for answers or attach more pages if needed) 1 Wante an ALP to perform y=a"+b*re" using macro to compute stare ishitra State Board of Technical Education if ee ee (Space for answers) BU Ry ; mov SF ; Diploma World MSBTE Diploma Se Material WV doin om talaga gimp ftor sinily meted! © SMSBiEDiplomayAlllBranches StudyMaterial

You might also like