[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