You are currently viewing [PRACTICAL]  Implement program to find the smallest and the largest number from an array of n number
Microprocessor 8085 programming

[PRACTICAL] Implement program to find the smallest and the largest number from an array of n number

0
(0)

[PRACTICAL] IMPLEMENT PROGRAM TO FIND THE SMALLEST AND THE LARGEST NUMBER FROM AN ARRAY OF N NUMBER

Are you looking for a step-by-step guide to Implement program to find the smallest and the largest number from an array of n number? here are the steps to implement program to find the smallest and the largest number from an array of n number.

Theory:

This program used to find smallest and largest elements of N array, here we are take array of 10 elements and find smallest and largest elements from array. Array location stared from C050.

Program:

LXI H,C050H
MVI C,0AH
MOV B,M
MVI D,00H
NEXT: MOV A,M
CMP B
JC MIN
CMP D
JC SKIP
MOV D,A
JMP SKIP
MIN: MOV B,A
SKIP: INX H
DCR C
JNZ NEXT
HLT

Output:

Value of memory location:

Value of Register:


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 0 / 5. Vote count: 0

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?