8086 program to search a number in a string

MicroprocessorMicrocontroller8086

In this program we will see how to find a number n from a string (an array of numbers).

Problem Statement

Write 8086 Assembly language program to find a number in a string (an array of numbers). The numbers are stored at memory offset 600 onwards.

Discussion

In this program we are taking only 5 numbers. We are searching the number 25. after successful search the DX register will hold the offset address, and BX register will hold the index of that number.

We are taking each number from that array and then compare it with 25. If the numbers are same, then we will return the address and index.

Input

Address
Data


600
96
601
12
602
3E
603
25
604
5F


 

Flow Diagram

 

Program

 

Output

Register
DX
BX
Vaue
0603
0003
raja
Published on 12-Mar-2019 12:17:08
Advertisements