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
how we can multiply two 8 bit number with rotation

SCAS : Scan String Byte or String Word:- This instruction scans a string of words or byte for an operand word or byte specified in the register AL or  register AX. The string i



I am running a small minecraft server off of my old mac mini, and am having a big issue. My computer isn''t very good, and even just running this server is an issue. I use a comma

write a program assembly language for adding two 3*3 matrix

Using the AddSub program from Ch3 under c:\Masm615\examples as a reference, write a program that subtracts three 16-bit integers using only registers. Insert a call DumpRegs statem

 Pin Description of 8086 The microprocessor 8086 is a 16-bit CPU available in 3 clock rates, for example 5, 8 and 10 MHz, packaged in a40 pin CERDIP or plastic package. The 8

write a program using assembly language that print your name

For an 8088 the 2 addresses linked with an 8259A are normally consecutive, and the AO line is associated to the AO pin, but because there are just 8 data pins on the 8259A and the