Write an assembly program to find out largest number, Assembly Language

Program :  Write an assembly program to find out the largest number from a given unordered array of 8-bit numbers that stored in the locations starting from a known address.

Solution :

Compare the number of the series with the (i+1 )th number by using CMP instruction. It will set the flags suitably, depending upon whether the ith number or the (i+1 )th number is higher. If the ith number is higher than (i+1 )th, leave it in register AX (any register can be used ). Or else, load the (i+1 )th number in register AX, replacing  the ith number  in AX. The process is repeated till all the members in the array have been compared.

1547_program2.jpg

Posted Date: 10/12/2012 7:53:38 AM | Location : United States







Related Discussions:- Write an assembly program to find out largest number, Assignment Help, Ask Question on Write an assembly program to find out largest number, Get Answer, Expert's Help, Write an assembly program to find out largest number Discussions

Write discussion on Write an assembly program to find out largest number
Your posts are moderated
Related Questions
I need to generate a random number bby using 8086 assembly language

III rd Generation Microprocessor: The single 3rd generation microprocessor chip having 64-pins began with the introduction of 16-bit Intel 8086 in 1978. The other essential



Comparison between 8086 and 8088 All the changes in 8088 above 8086 are indirectly or directly related to the 8-bit, 8085 compatible data and control bus interface. 1) The p

Write a MC68H12 assembly language program to find the largest number in an array of ten 8-bit numbers. The array is stored in memory locations starting at address $1100. Use branch

CALL : Unconditional Call:- This instruction is utilized to call a subroutine from a basic program. In case of assembly language programming, the term procedure is utilized int


Write a M68000 assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n

to separate positive and negative numbers