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
Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of ax register

Queue Operation :   RQ/CT0, RQ/G1-Request/Grant:   These pins are utilized by other local bus masters, in themaximum mode, to force the processor to release the loca

program to arrange a given set of numbers in descending order

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

Problem (a) Prepare the assembly code sequence for each of the four styles (accumulator, memory-memory, stack, load/store) of machine for the code fragment: A = B + C;


how to store a bulk data in a external eeprom

PC Bus and Interrupt System The PC Bus utilized a bus controller, address latches, and data transceivers (bidirectional data buffers). 1) Bus controller : ( Intel 8288 Bus

XOR: Logical Exclusive OR: The XOR operation is again carried out in a similar way to the AND and OR operation. The constraint over operands are also similar. The XOR operation pr

The Pentium Pro    Introduced in the year 1995, the Pentium Pro reflected  still  more  design  breakthroughs.  The Pentium Pro may process 3 instructions in a single clock cy