programa3.doc
TRANSCRIPT
Microprocessor 8085 Appendix A Explanation : Wearegiventwonumbers at memorylocationsD000HandD001H. Let thesenumbers be20 H and 50 H. We have to add the byte at memory location D000 H ( 20 H ) with the byte at memory location D001H ( 50 H). nitially we will store the !irst number in the accumulator. "sing #DD instruction add the two contents. $esult o! addition will be stored in the # register. %tore the result at memory location D002 H.&or e'am(le ) D000 H* 20 H 20 HD001 H * 50H + 50 H,0 H Algorithm :Step I : %tart Step II : -et the !irst number in # register.Step III : -et the second number in memory.Step IV : #dd the two numbers.Step V : %tore the result at memory location D002 H.Step VI : %to( Flowchart : $e!er !lowchart .. Program :InstructionCommentLXIH, D000 H ; HL points to the memory location D000 HMOVA, M; Get the contents of location Flowchart4; D000 H into the accumulator.IX H ; Increment HL to point to ne!t memory location i.e. D00"HADD M; A # A $M i.e. compute the a%%itionIX H ; Increment HL to point to ne!t memory location i.e. D00&HMOVM, A ; 'tore the result at memory location i.e. D00&HHL(