answersLogoWhite

0

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

13y ago

What else can I help you with?

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.


How can you separate odd and even numbers from the array of 10 numbers in 8085 microprocessor?

To separate odd and even numbers from an array of 10 numbers in the 8085 microprocessor, you can utilize a loop and the AND instruction. First, load each number from the array into a register and perform a bitwise AND operation with the value 1. If the result is 0, the number is even; if the result is 1, the number is odd. You can then store the odd numbers in one memory location and the even numbers in another, iterating through the entire array until all numbers are processed.


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?