answersLogoWhite

0


Best Answer

.model small

.stack 64

.data

n1 db 08h,02h

res db ?

.code

mov ax,@data

mov ds,ax

mov cx,02

lea si,n1

mov bl,0ffh

mine:mov al,[si]

cmp al,bl

jne loop1

jmp loop2

loop1:jnc loop2

mov bl,al

inc si

loop mine

jmp exit

loop2:inc si

loop mine

exit:mov res,bl

hlt

end

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

#include<iostream.h>

void main()

{ int a,b;

cout<<"Enter the two numbers";

cin>>a>>b;

if(x>y)

{

cout<<"\nThe greatest number"<<x;

}

else if

cout<<"\nThe greatest number"<<y;

}

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

You can use following steps for finding smallest number in 8085 microprocessor :-

XRA ; clear the accumulator MVI B, 30H ; load a number to B Register MVI C, 40H ; load a number to C Register MOV A, B ; Move the content of B to A CMP C ; Compare value of C against A JNC SMALL ; Jump if smaller **JMP END** ; Halt program if not small SMALL: MOV A, C ; save smaller num in accumulator **END: HLT**

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Give the program for finding smallest number in 8085 microprocessor?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you write program to read a set of real numbers and find the range is given by the difference between largest and smallest number?

Use the following algorithm (written in pseudocode). Let largest be the lowest possible real number. Let smallest be the greatest possible real number. Repeat while there is input... { Read real number r from input. If r is greater than largest then let largest be r. If r is less than smallest then let smallest be r. } End repeat. Let range be largest minus smallest. Output range.


What is the smallest port number that can be assigned?

1024


Write algorithm of a largest number in three numbers?

1. Read the 3 nos a,b,c 2. Let larget = a 3. if b &gt; largest then largest = b 4. if c &gt; largest then largest = c..... If you have to process more nos, read all of them in an array. Assume the first element be largest, do comparison through all elements of the array.... Similar algorithm can be developed for finding the lowest also. /*lab practice 2 damithguruge question 4 */ #include&lt;stdio.h&gt; int main() { int num1,num2,num3,num4; int smallest; printf("Please enter a number1"); scanf("%d%*c", &amp;num1); printf("Please enter a number2"); scanf("%d%*c" ,&amp;num2); printf("Please enter a number3"); scanf("%d%*c", &amp;num3); Printf("Please enter a numbe4r"); scanf("%d%*c", &amp;num4); /* num1 set as the smallest */ smallest=num1; if(smallest &gt; num2) then smallest=num2; else if smallest &gt;num3 then smallest=num3; else if smallest&gt;num4 then smallest=num4; printf("smallest number:%d\n,smallest"); return(0); endif endif endif }


Program to find the greatest number?

The greatest number is infinity.


What is the algorithm for finding largest and smallest of given number?

To find the largest number: Assume (temporarily) that the first number is the largest number. You might call this the "largest number found so far". Then, for each number after the first one, compare the number with the largest number found so far. If the new number in the list is larger, call that one the "largest number found so far". Repeat for each number. After processing all the numbers, the "largest number found so far" will simply be the largest number.For example, if your list is (5, 2, 8, -1), you start assuming that 5 (the first number in the list) is the largest number. You compare with 2 - "5" is still the largest number, since 2 is smaller. When you compare with 8, you find that 8 is larger, so you replace your "largest number" with 8. "-1" is smaller, so nothing changes. Since we processed the entire list, the largest number is now 8.You can do the same - mutatis mutandis - to find the smallest number.

Related questions

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


Write a Shell program to find the smallest number from a set of numbers?

k


Shell program to find the smallest digit of a given number?

syntax error


Do a program to find a smallest number in the array using 8085 microprocessor?

Lxih, 2200 mov c,m inxh mov a,m inxh cmp m jc l1 mov a,m dcr c jnz l2 inhx mov m,a hlt


Program for finding the factorial of the two given number using constructor?

kjhk


Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix?

Sp[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Answer]]ell chec[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix&amp;action=edit&amp;section=new|Answer it!]]k your answe[[Q/Discuss:Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Disc]][[help/answering questions|guidelin]]Spell check your answeresussionr[[help/signing in|full benefits]] Save C[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 ]][[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix&amp;action=edit&amp;section=new|Answering 'Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix?']]matrix?ancel[[Q/How many animals are in West Texas|How many animals are in West Texas?]][[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a]][[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a Service workshop?]] Service workshop?[[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a Service workshop?]]More Q&amp;A


If your finding the Greatest Common Factor of 2 given numbers and the smallest number is a factor of a larger number then what must the Greatest Common Factor be?

the smaller number


What number is microprocessor known as?

The microprocessor is also known as a central processing unit, or CPU.


What is a program for finding sqareroot of a number without using functions?

you read the book how to solve by dromy.


What refers to the number of bits that a microprocessor can manipulate at one time?

As quoted from Google Books, "Word size refers to the number of bits that a microprocessor can manipulate at one time."


What is range and how do you find it?

You take the smallest number in of data and subtract it from the biggest number. For example in 34, 41, 37, 29, and 34 the biggest number is 41 and the smallest number is 29, so you do 41-29 which is 12. Your range is 12.