answersLogoWhite

0


Best Answer

Sample problem 1:

(2200H) = 04

(2201H) = 34H

(2202H) = A9H

(2203H) = 78H

(2204H) =56H

Result = (2202H) = A9H

Source program :

  • LDA 2200H
  • MOV C, A : Initialize counter
  • XRA A : Maximum = Minimum possible value = 0
  • LXI H, 2201H : Initialize pointer
  • BACK: CMP M : Is number> maximum
  • JNC SKIP : Yes, replace maximum
  • MOV A, M
  • SKIP: INX H
  • DCR C
  • JNZ BACK
  • STA 2300H : Store maximum number
  • HLT : Terminate program execution
User Avatar

Wiki User

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

Wiki User

11y ago

Sample problem

(2200H) = 04

(2201H) = 34H

(2202H) = A9H

(2203H) = 78H

(2204H) =56H

Result = (2202H) = A9H

Source program

LDA 2200H

MOV C, A : Initialize counter

XRA A : Maximum = Minimum possible value = 0

LXI H, 2201H : Initialize pointer

BACK: CMP M : Is number> maximum

JNC SKIP : Yes, replace maximum

MOV A, M

SKIP: INX H

DCR C

JNZ BACK

STA 2300H : Store maximum number

HLT : Terminate program execution

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

mvi a,ffh lxi h 8500h mov d,m back:inx h cmp m jc loop mov a,m loop:dcr d jnz back inx h mov m,a hlt

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Do a program to find a largest number in the array using 8085 microprocessor?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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.


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


8086 assembly program to sort a list of integers?

assembly language program for sorting an array using 8086 microprocessor.


Program to print all the even numbers of an array in visual basic?

find even number in array


What is the 8085A microprocessor code for finding the largest number?

The processor makes no difference in C programming -- the compiler will generate the appropriate instructions for you. To find the largest number in a sequence of numbers, store the numbers in an array. Then invoke the following function, passing the array and its length: unsigned largest (double* num_array, unsigned size) { if (!num_array !size) return size; unsigned max = 0; unsigned index; for (index=1; index<size; ++index) if (num_array[index]>num_array[max]) max = index; return max; } The return value holds the index of the largest value in the array.


Write a function in java that accepts an array of integers and returns the second largest integer in the array Return -1 if there is no second largest?

Method 1: Sort the array in descending order, compare 1st and 2nd if not same , return 2nd if same return -1 Method 2: Find the largest number in the array, initialize another array with dimension 1 less than of original. Copy the array elements from the original array minus the largest element. not select largest from the second array and compare with the previous one if not same return the second largest if same return -1


What is the condition of second largest number?

There is no such condition. The algorithm to locate the second largest number in an array of numbers is: Sort the array in descending order. Remove the duplicate values from the array. If there are two or more elements remaining, return the second number. If there is less than two elements remaining, return the NaN value (not a number).


What is the Program to find the largest element in an array and position occurrence?

#include<stdio.h> #include<conio.h> main() { int a[100]; int n,largest,index,position; printf("enter the number of elements in the array"); scanf("%d",&n); printf("enter %d elements",n); for(index=0;index<n;index++) scanf("%d",&a[index]); largest=a[0]; position=0; for(index=1;index<n;index++) if(a[index]>largest) { largest=a[index]; position=index; } printf("largest element in the array is %d\n",largest); printf("largets element's position in the array is %d\n",position+1); getch(); }


How do you write the 8051 micro controller alp for finding the largest number in an array?

1


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


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


Biggest of three numbers using ternary operator in java?

// largest = largest of a, b, c public class largest { public static void main(String args[]) { int a,b,c,largest; a=0; b=0; c=0; a=Integer.parseInt(args[0]); b=Integer.parseInt(args[1]); c=Integer.parseInt(args[2]); largest=a>b?(a>c?a:c):(b>c?b:c); System.out.println("The largest no. of "+a+","+b+"and"+c+"is"+largest); } }