8086 program to find the min value in a given array

MicroprocessorMicrocontroller8086

In this program we will see how to find the minimum number in a given array.

Problem Statement

Write 8086 Assembly language program to find the minimum number in a given array, which is starts from memory offset 501. The size of the series is stored at memory offset 500. Store the minimum number at memory offset 600.

Discussion

At first we are taking the size of the array from memory offset 500. Then using that size, we are initializing the counter to read and check all the numbers. We are taking the first number into AL, then check each number and compare it with AL. If the AL is larger than the array element, then update AL with the array element. Otherwise skip that element and point to next element. Thus the minimum element is found.

Input

Address
Data


500
06
501
51
502
24
503
2C
504
CF
505
3E
506
45


 

Flow Diagram

 

Program

 

Output

Address
Data


600
24


raja
Published on 12-Mar-2019 15:47:45
Advertisements