You are currently viewing [PRACTICAL] Implement a program to sum integers from 0 to 9
Microprocessor 8085 programming

[PRACTICAL] Implement a program to sum integers from 0 to 9

3
(1)

[PRACTICAL] IMPLEMENT A PROGRAM TO SUM INTEGERS FROM 0 TO 9

Are you looking for a step-by-step guide to Implement a program to sum integers from 0 to 9? here are the steps to implement a program to sum integers from 0 to 9.

Theory:

To sum from 0 to 9 value we can add each value to accumulator and final value store into accumulator. To perform sum operation we use “ADD” instruction and by using LOOP we can add all value from 0 to 9 to accumulator.

Program:

MVI A,00h
MVI B,0Ah
NEXT: ADD B
DCR B
JNZ NEXT
HLT`

Output:

Accumulator: (45)10 = (2D) 16

For more practical related to 885 Programming please visit the 8085 Programming link

How useful was this post?

Click on a star to rate it!

Average rating 3 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

As you found this post useful...

Share this post on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?