answersLogoWhite

0

Res db " position",13,10,"$"

msg2 db 'key not found!!!!!!!!!!!!!. $'

.code

mov ax,@data

mov ds,ax

mov bx,00

mov dx,len

mov cx,key

again:cmp bx,dx

ja fail

mov ax,bx

add ax,dx

shr ax,1

mov si,ax

add si,si

cmp cx,arr[si]

jae big

dec ax

mov dx,ax

jmp again

big:je success

inc ax

mov bx,ax

jmp again

success:add al,01

add al,'0'

mov res,al

lea dx,msg1

jmp disp

fail:lea dx,msg2

disp:mov ah,09h

int 21h

mov ah,4ch

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How can binary search prevent overflow in a program?

Binary search can prevent overflow in a program by efficiently dividing the search space in half at each step, reducing the number of comparisons needed. This helps prevent the program from running out of memory or exceeding its capacity, which can lead to overflow errors.


Program for interfacing of relay with 8085?

we want relay interface with 8085 and also attech the program


Best first search program in c?

The best search programs to attempt writing in C are the following: Linear search (simplest), Binary search (faster) Hash search (fastest).


Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


Prime numbers between 1 to 10 in microprocessor 8085?

program to find prime number in 8085 microprocessor


Would you give me a 8085 microprocessor program to convert hexadecimal number to binary number?

Certainly! To convert a hexadecimal number to a binary number using an 8085 microprocessor, you would typically use a series of instructions involving logical operations such as AND, OR, and shifts. One common approach is to isolate each hexadecimal digit, convert it to its binary equivalent, and then combine the binary values to form the final binary number. The specific program code would depend on factors such as the starting memory address, the input method, and the desired output format.


Program to convert hex to decimal in 8085?

jump,b


How you can run a c program in Linux 2.4?

if it is n already compiled binary program: ./program-name if it is a code, gcc program-code.c -o program-name if gcc is not installed, on debian: search for a deb package and install it, or, apt-get install gcc on redhat: search for an rpm package and install it.


What assumption about the list is made when binary search is conducted?

Binary search requires that the list be in search key order.


2x2 matrix multiplication program in 8085 processor?

how to write a program for matrix multiplication in microprocesspr


Implementation of binary search algorithm using ASM assembler in 8086?

Hi, I hope this is useful http://www.indiastudychannel.com/projects/2748-Assembly-language-program-for-Binary-search.aspx good luck!


How can you merge two binary search trees into a single binary search tree?

To merge two binary search trees into a single binary search tree, you can perform an in-order traversal on each tree to extract their elements, combine the elements into a single sorted list, and then construct a new binary search tree from the sorted list. This process ensures that the resulting tree maintains the binary search tree property.