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
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

Arithmetic Instruction :               These instructions are usually perform the arithmetic operations, like subtraction ,multiplication, addition, and division along with th

need algorithm for multiplication in assembly with out mul function?

SEG : Segment of a Label:- The SEG operator is which is used to decide the segment address of the, variable, label or procedure and substitutes the segment base address in plac

8254 Programmable Timer A diagram of Intel's 8254 interval event/timer counter is given in Figure. The 8254 consists of 3 identical counting circuits, per of which has GATE and

write and run a programme using 8086 assembly language that interchange the lower four bits of AL registered with upper four bits.

Write a program to calculate the first 20 numbers of Fibonacci series. Use the stack (memory) to store the calculated series. Your debugger output should look like the following sc

AAA: ASCII Adjust after Addition operation the AAA instruction is executed after an ADD instruction that adds 2 ASCII coded operands to give a byte of outcome in the AL. The AAA i

Type of Microprocessor : Microprocessors fall into 3 categories: Single Chip Microcomputers: - Contains RWM, ROM, microprocessor, I/O port, timer and clock. General pu

how to find out the given number is positive or negative?