Laboratory Experiments Manual For 8085 Microprocessor .

3y ago
170 Views
14 Downloads
209.48 KB
30 Pages
Last View : 30d ago
Last Download : 1m ago
Upload by : Konnor Frawley
Transcription

Laboratory Experiments Manual for 8085 MicroprocessorExperiment No. 1 - Addition of Two 8-bit Numbers and Sum is 8-bitAIM: Write 8085 assembly language program for addition of two 8-bit numbers and sum is 8 bit.Instruments Required: 1. 8085 Microprocessor Kit2. 5V Power supplyTheory : Consider the first number 26H is stored in memory location 8000H and the second number 62His stored in memory location 8001H. The result after addition of two numbers is to be stored in the memorylocation 8002 H. Assume program starts from memory location 8500H.Algorithm1.Initialise the memory location of first number in HL register pair.2.Move first number/data into accumulator3.Increment the content of HL register pair to initialise the memory location of second data4.Add the second data with accumulator5.Store the result in memory location 8003HPROGRAMMemoryaddress8500Machine CodesLabelsMnemonicsOperandsComments21, 00, 80LXIH, 8000 H85037EMOVA,M850423INXH850566ADDM8506850932, 03, 8076STAHLT8003HAddress of first number inH-L register pair.Transfer first number inaccumulator.Increment content of H-Lregister pairAdd first number andsecond numberStore sum in 8003 HHaltExperimental ResultsInput DATAMemory location80008001Data26H62HRESULTMemory location8003Data88HConclusion:The addition of two 8-bit numbers is performed using 8085 microprocessor where sum is 8-bit.Precautions:1.Properly connect the 8085 microprocessor kit with power supply terminals.2.Switch on the power supply after checking connections3.Handle the Trainer kit carefully.Viva-Voice Questions:

1.What is the function of LXI H, 8000 H instruction?2.How you can store a data in a memory location?3.How you can read a data from a memory location?4.What are flags available in 8085 ?5.What is the function of RESET key of a 8085 microprocessor kitExperiment No. 2 - Addition of two 8 bit numbers and sum is 16-bitAIM: Write 8085 assembly language program for addition of two 8-bit numbers and sum is 16 bit.Instruments Required: 1. 8085 Microprocessor Kit2. 5V Power supplyTheory : The first number F2H is stored in memory location 8501H and the second number 2FH is storedin memory location 8502H. The result after addition will be stored in the memory location 8503 H and8504H. Consider program is written from memory location 8000H.Algorithm:Initialise the memory location of 1st data in HL register pair.Store first data in the memory locationIncrement the content of HL register pair for entering next data in the next memory locationStore second data in the memory locationMove second number in accumulatorDecrease the content of HL register pairAdd the content of memory (first data) with accumulatorStore the results in memory location 8503H and 8504H.PROGRAMMemoryaddress8000Machine CodesLabelsMnemonicsOperandsComments21, 01, 85LXIH, 8501 H800336, F2MVIM, F2H800523INXH800636, 2FMVIM, 2FH800880097E0E, 00MOVMVIA, MC,00H800B2BDCXHAddress of 1st number inH-L register pair.Store 1st number inmemory locationrepresented by H-Lregister pair.Increment content of H-Lregister pairStore 2nd number inmemory locationrepresented by H-Lregister pair2nd number in accumulatorInitialise C register with00H to store MSBs of sumAddress of 1st number

800C66ADDM800DD2, 11, 85JNCLEVEL 180100CINRC801132, 03, 85STA8503H801479MOVA,C801532, 04, 85STA2504 H801876HLTLEVEL 12501 in H-L pairAddition of 1st numberand 2nd numberIf carry does notgenerated , jump toLEVEL 1 ?When carry is generated,increment C register.Store LSBs of sum inmemory location 8503HMove MSBs of sum inaccumulatorStore MSBs of sum inmemory location 8503H.HaltExperimental ResultsInput DATAMemory location85018502DataF2H2FHRESULTMemory location85038504Data82H LSBs of sum01H MSBs of sumConclusion:The addition of two 8-bit numbers is performed using 8085 microprocessor where sum is 16-bit.Precautions:Properly connect the 8085 microprocessor kit with power supply terminals.Switch on the power supply after checking connectionsHandle the Trainer kit carefully.Viva-Voice Questions:1.What is the function of JNC instruction?2.What is the difference between conditional and unconditional jump instruction?3.What is the function of STA 2500 instruction?4.What is multi byte?Experiment No. 3 - Addition of Two 16-Bit Numbers and Sum is 16-bitAIM: Write 8085 assembly language program for addition of two16-bit numbers and sum is 16 bit.Instruments Required: 1. 8085 Microprocessor Kit2. 5V Power supplyTheory : The first 16-bit number is stored in 8501 and 8502 memory locations. The second 16-bit numberis stored in 8503 and 8504 memory locations. After addition result will be stored from 8505 and 8506memory locations. Assume program starts from memory location 8000H

Algorithm:1.Store first 16-bit number in H-L pair.2.Exchange the contents of D-E pair and H-L pair to store first number in D-E registers pair.3.Store second 16-bit number in HL register pair.4.Addition of 1st and 2nd number5.Store result in 8505H and 8506H locations.PROGRAMMemoryaddress8000Machine CodesLabelsMnemonicsOperandsComments2A, 01, 85LHLD8501 H8000EBXCHG 80002A, 03, 85LHLD8503 H800019DADD800022, 05, 85SHLD8505 H800076HLTLoad the content of 8501Hlocation in L register and Hregister is loaded with thecontent of 8502H location.The contents of HL registerpair are exchanged withD-E register pair. So thatfirst data is stored in DEregister pair.Load second 16-bit number(data-2) in H-L pair.The contents of D-E pairare added with the contentsof H-L pair and result isstored in H-L pair.Store LSBs of sum in 8505and MSBs of sum 8506 H.HaltExperimental ResultsInput DATAMemory locationData850185028503850405H LSBs of data-101H MSBs of data-102H LSBs of data-203H MSBs of data-2Memorylocation85058506RESULTData07H LSBs of sum04H MSBs of sumConclusion:The addition of two 16-bit numbers is performed using 8085 microprocessor where sum is 16-bit.Precautions:1.Properly connect the 8085 microprocessor kit with power supply terminals.2.Switch on the power supply after checking connections3.Handle the Trainer kit carefully.Viva-Voice Questions:

1.What is the function of XCHG instruction?2.How you can load 16-bit data in 8500H and 8501H memory locations?3.What is the difference between LSLD and SHLD instructions?4.What is the function of DAD D instruction?5.What is difference between byte and word?Experiment No. 4 - Decimal Addition of Two 8-Bit Numbers and Sum is 8-bitAIM: Write 8085 assembly language program for decimal addition of two8-bit numbers and sum is 8 bit.Instruments Required: 1. 8085 Microprocessor Kit2. 5V Power supplyTheory :Two decimal numbers are stored in 8000H and 8001H. The result is to be stored in 8002Hlocation. Consider program starts from memory location 8100HAlgorithm1.Initialise the memory location of first number in HL register pair.2.Load the first number in accumulator3.Increment the content of HL register pair to initialise the memory location of second data4.Addition of the content of second memory location with first data5.Decimal adjustment of result6.Store the result in memory location 8002HPROGRAMMemoryaddress8100Machine CodesLabelsMnemonicsOperandsComments21, 50, 7810A2732, 02, 8076DAASTAHLT8002Load the address of firstnumber in H-L register pairStore the first number inaccumulatorIncrement H-L register pair tolocate second numberAddition of 1st and 2ndnumberDecimal AdjustStore result in 8002H locationHaltExperimental ResultsInput DATAMemory location80008001Data22H67HRESULTMemory location8002Data89H

Conclusion:The decimal addition of two 8-bit numbers is performed using 8085 microprocessor where sum is 8-bit.Precautions:1.Properly connect the 8085 microprocessor kit with power supply terminals.2.Switch on the power supply after checking connections3.Handle the Trainer kit carefully.Viva-Voice Questions:1.What is the function of DAA instruction?Experiment No. 5 - One’s Complement of an 8-bit NumberAIM: Write 8085 assembly language program for one’s complement of an 8-bit numbersInstruments Required: 1. 8085 Microprocessor Kit2. 5V Power supplyTheory :The number is stored in memory location 8050H and one’s complement of number will be stored inlocation 8051H. Assume the program memory starts from 8000H.Algorithm1.Load memory location of data 8050H in H-L registers pair.2.Move data into accumulator3.Complement accumulator4.Store the result in memory location 8051HPROGRAMMemoryaddressMachine Codes8000LabelsMnemonicsOperandsComments21, 50, 80LXIH,8050H80037EMOVA,M8004800580083F32, 51, 8076CMASTAHLT8051HLoad address of number in HL register pairMove the number intoaccumulatorComplement accumulatorStore the result in 8051HStopIn the above program, the first two instructions LXI H,8050H and MOV A,M can be replaced by directlyloading the content of location 8050H in accumulator. For this LDA 8050H can be used.Experimental ResultsDATARESULT

Memory location8050DataF0HMemory location8051Data0FHConclusion:The one’s complement of an 8-bit numbers is performed using 8085 microprocessor.Precautions:1.Properly connect the 8085 microprocessor kit with power supply terminals.2.Switch on the power supply after checking connections3.Handle the Trainer kit carefully.Viva-Voice Questions:2.Define one’s complement of an 8-bit numbers3.What is the function of CMA instruction?4.Experiment No. 6 Two’s Complement of an 8-bit NumberAIM: Write 8085 assembly language program for two’s complement of an 8-bit numbersInstruments Required: 1. 8085 Microprocessor Kit2. 5V Power supplyTheory : The number is stored in memory location 8500H. The two’s complement will be stored in 8501H. Theprogram is written from memory location 8510HAlgorithm:1.Transfer the content of memory location 8500H to accumulator.2.Complement the content of accumulator3.Add 01H with accumulator to get two’s complement of number4.Store the result in memory location OperandsComments3A, 00, 85LDA8500H851385142FC6, 01CMAADI01H851632, 01, 85STA8501H851976HLTLoad the content of memorylocation 8500H inaccumulatorComplement accumulatorAdd 01H with accumulatorto find two’s complement ofnumberStore result in 8501HlocationStopExperimental ResultsLabels

DATAMemory locationData8500F0HRESULTMemory locationData850110HConclusion:The two’s complement of an 8-bit numbers is performed using 8085 microprocessor.Precautions:1.Properly connect the 8085 microprocessor kit with power supply terminals.2.Switch on the power supply after checking connections3.Handle the Trainer kit carefully.Viva-Voice Questions:1.Define two’s complement of an 8-bit numbers2.What is the function of CMA instruction?3.Why ADI 01H is used intwo’s complement of an 8-bit number.Experiment No. 7 - Find out Square Root of 0, 1, 4, 9, 16, 25, 36, 49, 64 and 81Using Look Up TableAIM: Write 8085 assembly language program to find out square root of 0, 1, 4, 9, 16, 25, 36, 49 , 64 and81 using look up tableInstruments Required: 1. 8085 Microprocessor Kit2. 5V Power supplyTheory : Load the number in memory location 9000H and the square root of number will be stored in thememory location 9001H. The square root of numbers 0, 1, 4, 9, 16, 25, 36, 49, 64 and 81 are stored in8500H, 8501H, 8504H, 8509H, 8516H, 8525H, 8536H, 8549H, 8564H and 8581H locations respective1yas given in tabular form. Assume the program is written from memory location 9100H.Algorithm1.Store the number in accumulator from memory location 9000H2.Move the content of Accumulator in L register and store 85H in H register3.When the number is 16, the content of H and L register are 85 and 16H respectively. Then the H-Lregister pair represents 8516H memory location.4.Copy square root of number in accumulator from memory location which is represented by H-Lregister pair5.Store the result in 9001HPROGRAM

Memoryaddress9100MachineCodes3A, 00, L, A9104910626, 857EMVIMOVH, 85A, M910732, 01, 90STA9001HLoad the number inaccumulator from memorylocation 9000HCopy the content ofAccumulator in L registerLoad 85H in H registerMove square root of decimalnumber in accumulator frommemoryStore square root value in9001H910A76HLTLook –up 81SUUARE ROOT00010203040506070809Experimental ResultsADDRESS9000 HSQUARE16ADDRESS9001 HResult04Conclusion:The square root of 0, 1, 4, 9, 16, 25, 36, 49 , 64 and 81 are determined using look up tablein 8085 microprocessor.Precautions:1.Properly connect the 8085 microprocessor kit with power supply terminals.2.Switch on the power supply after checking connections3.Handle the Trainer kit carefully.Viva-Voice Questions:1.How look up table is used to determine the square of a number?2.Write some applications of look up table.

Experiment No. 8 - Display Digits 0 1 2 3 4 5 6 7 8 9 A B C D E F on the datafield of screenAIM: Write 8085 assembly language program to display 0 1 2 3 4 5 B C D E F on the data filed.Instruments Required: 1. 8085 Microprocessor Kit2. 5V Power supplyTheory : This program will display a 6 7 8 9 A flashing 0 1 2 3 4 5 B C D E F on the data filed. Theflashing rate is 500ms. Consider program is written from memory location 8000H and data is stored from8C50H.Algorithm1. Initialize the stack pointer2. Clear the display3. Point to the data which will be displayed in the data field4. Wait for 500mili second5. Cear the display and wait for 500 ms6. Jump to step-3PROGRAMMemoryaddress80008003MachineCodes31, FF, 8C0E, C,0F21, 50, 8CLXIH,8C508008800A800C800D800E800F3E, 0106, 00E5C5F5CD, 47, ze the stack pointerLoad the counter, C register with0FHStarting address where the displaydata is storedA is 01 and B is 00 to displaycharacter in the data fieldMove the content of HL, BC, PSWand A registers into stack801280158018801B801E802180228023802411, 00, 00CD, BC, 03CD, D0, 05CD, 47, 0311, 00, AYOUTPUTD,0000HDELAYPSWBHH802580260DC2, 0C, 80DCRJNZCLOOP ILOOP IClear the display by using asubroutine whose address is 0347HGenerate 500 ms delayDisplay character in data fieldTo display the number for 500 msPOP the content of PSW, A, BC andHL from stackIncrement HL register pair todisplay next numberDecrement C registerJump to LOOP I if the content of C

is not equal to TA00 H01 H02 H03 H04 H05 H06 H07 HADDRESS8C588C598C5A8C5B8C5C8C5D8C5E8C5FDATA08 H09H0AH0B H0C H0D H0E H0F HConclusion:Display 0 1 2 3 4 5 B C D E F on the data filed of 8085 microprocessor.Precautions:1.Properly connect the 8085 microprocessor kit with power supply terminals.2.Switch on the power supply after checking connections3.Handle the Trainer kit carefully.Viva-Voice Questions:1.How we can display any number on the data field of 8085 microprocessor.3.Write some applications of flashing display.Experiment No. 9 - Rolling Display “HELP 85 up” on the address and data fieldof screenAIM: Write 8085 assembly language program for rolling display “HELP 85 up” in the address and datafiled.Instruments Required: 1. 8085 Microprocessor Kit2. 5V Power supplyTheory : This program will display a flashing “HELP 85 up” in the address and data filed. The flashingrate is 500ms. Assume program is written from memory location 9000H and data is stored from 9C50H.Algorithm1. Initialize the stack pointer2. Clear the displayPoint to the data of “HELP 85” and display “HELP 85 ” in the address and data fieldWait for 500 msClear the display and wait for 500 msJump to start

PROGRAMMemoryaddress90009003MachineCodes31, FF, 9CCD, 47, ARSTARTMVIXRAMOVLXIC, 06AB, AH, 9C50LOOP IPUSHPUSHPUSHCALLHBPSWOUTPUTInitialize the stack pointerClear the display by using asubroutine whose address is 0347HLoad the counter, C register with 06A is 00 to display character in theaddress fieldStarting address where the display isto be startedMove the content of HL, BC, PSWand A registers into stack900690089009900A0E, 0AAF4721, 50, 9C900D900E900F9010E5C5F5CD, D0, 059013901590173E, 0106, 00CD, D0, 05MVIMVICALLA, 01B, 00OUTPUT901A901D902090219022902321, 00, 00CD, BC, 490250DC2, 0D, 90DCRJNZCLOOP IC3, 06, 90JMPSTARTDATA16 H16 H16 H16 H16 519C529C539C54DATA10H0E H11H12H08 H05 HCall OUTPUT subroutine to displaycharacters in address fieldInitialize A, B for data to bedisplayed in data fieldCall OUTPUT subroutine to displaycharacters in data fieldGenerate 500 ms delayPOP the content of PSW, A, BC andHL from stackIncrement HL register pair todisplay next numberDecrement C registerJump to LOOP I if the content of Cis not equal to zero.Jump to START(H)(E)(L)(P)(8)(5)Conclusion:Rolling Display “HELP 85 up” in the address and data filed of 8085 microprocessor is performed.Precautions:1.Properly connect the 8085 microprocessor kit with power supply terminals.2.Switch on the power supply after checking connections

3.Handle the Trainer kit carefully.Viva-Voice Questions:1.How we can display any number and characters on the data field of 8085 microprocessor.4.Write some applications of rolling display.Laboratory Experiments Manual for 8086 MicroprocessorExperiment No. 10 - Program for Addition of Two 8 Bit Numbers and Sum is 16 BitAIM: Write 8086 assembly language program for Addition of Two 8 Bit Numbers and Sum is 16 Bit.Instruments Required: 1. 8086 Microprocessor Kit2. 5V Power supply3. Personal Computer4. UPSTheory : The first number FFH is stored in AL register and the second number 22H is stored in BLregister. The result after addition will be stored in AX.Algorithm1.Store first data in AL register2.Store second data in BL register3.Add the content of AL and BL.4.CY flag will be set, if result is more than 8 bitPROGRAMC:\ DEBUG-A 100017DA:1000 MOV AL, FF ;Load FFH in AL register17DA:1002 MOV BL, 22 ;Load 22H in AL register17DA:1004 ADD AL, BL ;Add content of BL to AL17DA:1006 HLT17DA:1007-U 1000 100617DA:1000 B0 FF17DA:1002 B3 2217DA:1004 00 D817DA:1006 F4-G 1006MOVMOVADDHLTAL,FFBL,22AL,BLAX 0021 BX 0022 CX 0000 DX 0000 SP 0004 BP 20CD SI 0000 DI 0000DS 17DA ES 17DA SS 9FFF CS 17DA IP 1006 NV UP EI PL NZ AC PE CY17DA:1006 F4HLT

Conclusion:Initially the program is loaded in the memory location 17DA:1000 to 17DA:1006. Then the object codesof program the program will be visualized after execution of U 1000 1006 command. If the above programis executed by G1006 command, result will be displayed on the screen. As result is more that 8 bit, thecontent of AL is 21 which is LSB and the CY flag is set to detect the MSB.Precautions:Properly connect the 8086 microprocessor kit with power supply terminals and Personal computer.Switch on the power supply after checking connectionsHandle the Trainer kit carefully.Viva-Voice Questions:What are the registers are used to store data?At what condition the carry flag is set?.What are the different flags available in 8086?Experiment No. 11-Program for Addition of Two 16 Bit Numbers and Sum is 16 BitAIM: Write 8086 assembly language program for Addition of Two 16 Bit Numbers and Sum is 16 Bit.Instruments Required: 1. 8086 Microprocessor Kit2. 5V Power supply3. Personal Computer4. UPSTheory : The first 16-bit number is stored in AX register. The second 16-bit number is stored in BXregister. After addition result will be stored in AX.AlgorithmStore first 16-bit number in AX.Store second 16-bit number in BX.Addition of 1st and 2nd number.PROGRAMC:\ DEBUG-A 100017DA:1000 MOV AX, 4622 ; 16 bit data in AX.17DA:1003 MOV BX, 3244 ; 16 bit data in BX.17DA:1006 ADD AX, BX ; Contents of BX is added to AX.17DA:1008 HLT17DA:1009-U 1000 100817DA:1000 B8 22 46MOV AX,462217DA:1003 BB 44 32MOV BX,324417DA:1006 01 D8ADD AX,BX17DA:1008 F4HLT-G 1008AX 7866 BX 3244 CX 0000 DX 0000 SP 0004 BP 20CD SI 0000 DI 00

Laboratory Experiments Manual for 8085 Microprocessor . Experiment No. 1 - Addition of Two 8-bit Numbers and Sum is 8-bit AIM: Write 8085 assembly language program for addition of two 8-bit numbers and sum is 8 bit. Instruments Required: 1. 8085 Microprocessor Kit . 2. 5V Power supply . Theory : Consider the first number 26H is stored in memory location 8000H and the second number 62H

Related Documents:

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

10 tips och tricks för att lyckas med ert sap-projekt 20 SAPSANYTT 2/2015 De flesta projektledare känner säkert till Cobb’s paradox. Martin Cobb verkade som CIO för sekretariatet för Treasury Board of Canada 1995 då han ställde frågan

service i Norge och Finland drivs inom ramen för ett enskilt företag (NRK. 1 och Yleisradio), fin ns det i Sverige tre: Ett för tv (Sveriges Television , SVT ), ett för radio (Sveriges Radio , SR ) och ett för utbildnings program (Sveriges Utbildningsradio, UR, vilket till följd av sin begränsade storlek inte återfinns bland de 25 största

Hotell För hotell anges de tre klasserna A/B, C och D. Det betyder att den "normala" standarden C är acceptabel men att motiven för en högre standard är starka. Ljudklass C motsvarar de tidigare normkraven för hotell, ljudklass A/B motsvarar kraven för moderna hotell med hög standard och ljudklass D kan användas vid

LÄS NOGGRANT FÖLJANDE VILLKOR FÖR APPLE DEVELOPER PROGRAM LICENCE . Apple Developer Program License Agreement Syfte Du vill använda Apple-mjukvara (enligt definitionen nedan) för att utveckla en eller flera Applikationer (enligt definitionen nedan) för Apple-märkta produkter. . Applikationer som utvecklas för iOS-produkter, Apple .

The MCS-85 System Design Kit (SDK-85) contains all the parts with which you can build a complete 8085 microcomputer system on a single board, and a library of MCS-85 I iterature to help you learn to use it. The finished computer has the following built-in features: High-performance, 3 M Hz 8085 cpu (1.3 p.s instruction cycle)

och krav. Maskinerna skriver ut upp till fyra tum breda etiketter med direkt termoteknik och termotransferteknik och är lämpliga för en lång rad användningsområden på vertikala marknader. TD-seriens professionella etikettskrivare för . skrivbordet. Brothers nya avancerade 4-tums etikettskrivare för skrivbordet är effektiva och enkla att

BSc Accounting and Finance Department of Accounting Pie chart showing breakdown by country yet to place *Data for registered BSc Accounting and Finance students in years 1-3 in 2013-14 This guide is printed on recycled stock. The programme The BSc Accounting and Finance programme is widely regarded as being at the forefront of international teaching in its field. It is known for pioneering .