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

M Microprocessor 8085 Appendix A

This document provides an explanation, algorithm, flowchart and program for multiplying two bytes stored in memory locations using successive addition. It explains that one number is loaded and used as the first number, while the other is used as a counter. The first number is continually added to a running total stored in the result register until the counter reaches zero. The result is then stored back in memory. An example is provided where the bytes 12H and 10H stored at locations D000H and D001H respectively are multiplied, with the result 120H stored at location E000H.

Uploaded by

manpreet kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

M Microprocessor 8085 Appendix A

This document provides an explanation, algorithm, flowchart and program for multiplying two bytes stored in memory locations using successive addition. It explains that one number is loaded and used as the first number, while the other is used as a counter. The first number is continually added to a running total stored in the result register until the counter reaches zero. The result is then stored back in memory. An example is provided where the bytes 12H and 10H stored at locations D000H and D001H respectively are multiplied, with the result 120H stored at location E000H.

Uploaded by

manpreet kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

M Microprocessor 8085

Appendix A

Explanation :

Consider that a byte is present at the memory location D000 H and second byte is present at memory
location D001 H.
We have to multiply the bytes present at the above two memory locations.
We will multiply the numbers using successive addition method.
In successive addition method, one number is accepted and other number is taken as a counter. The
first number is added with itself, till the counter decrements to zero.
Result is stored at memory locations E000 H and E001 H.
For example : D000 H = 12 H, D001 H = 10 H
Result = 12H + 12H + 12H + 12H + 12H + 12H + 12H + 12H + 12H + 12H
Result = 0120 H
E000 H = 20 H
E001 H = 01 H

Algorithm :

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

:
:
:
:
:
:

Get the first number.


Get the second number as counter.
Initialize result = 0.
Result = Result + First number.
Decrement counter
If count 0, go to step V.

Step VII : Store the result.


Step VIII : Stop.

Flowchart : Refer flowchart 19.

Program :
Instruction

LDA
MOV
MVI
LDA
MOV
LXI
BACK: DAD
DCR
JNZ

D000H
E, A
D, 00
D001H
C, A
H, 0000H
D
C
BACK

SHLD E000H
HLT

Comment
; A = first number
; E = first number
; D = 00 H
; A = second number
; Initialize counter
; Result = 0
; Result = result + first number
; decrement count
; If count 0 repeat
; Store result
; Terminate program execution

Flowchart 19

You might also like