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

Microprocessor 8085 Appendix A

This document describes adding two numbers stored in memory locations D000H and D001H. It explains that the first number is loaded into the accumulator from D000H, then the second number is added from D001H. The result is stored in the accumulator and then stored in memory location D002H. An algorithm and flowchart are provided, as well as an 8085 assembly program to perform the addition.

Uploaded by

manpreet kaur
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Microprocessor 8085 Appendix A

This document describes adding two numbers stored in memory locations D000H and D001H. It explains that the first number is loaded into the accumulator from D000H, then the second number is added from D001H. The result is stored in the accumulator and then stored in memory location D002H. An algorithm and flowchart are provided, as well as an 8085 assembly program to perform the addition.

Uploaded by

manpreet kaur
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Microprocessor 8085

Appendix A

Explanation :

We are given two numbers at memory locations D000 H and D001 H. Let these numbers be
20 H and 50 H.
We have to add the byte at memory location D000 H ( 20 H ) with the byte at memory location D001
H ( 50 H).
Initially we will store the first number in the accumulator.
Using ADD instruction add the two contents. Result of addition will be stored in the A register.
Store the result at memory location D002 H.
For example :
D000 H = 20 H
20 H
D001 H = 50 H
+
50 H
70 H

Algorithm :

Step I
Step II
Step III
Step IV
Step V
Step VI

:
:
:
:
:
:

Start
Get the first number in A register.
Get the second number in memory.
Add the two numbers.
Store the result at memory location D002 H.
Stop

Flowchart : Refer flowchart 4.

Program :

Instruction
LXI H, D000 H
MOV A, M
4
INX H
ADD M
INX H
MOV M, A
HLT

Comment
; HL points to the memory location D000 H
; Get the contents of location
;
;
;
;
;

Flowchart

D000 H into the accumulator.


Increment HL to point to next memory location i.e. D001H
A = A +M i.e. compute the addition
Increment HL to point to next memory location i.e. D002H
Store the result at memory location i.e. D002H

You might also like