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 is bob different from johnny in the outsiders

) What is the difference between re-locatable program and re-locatable data?

i have trying to do the homework but there is a mistake. (Counting positive and negative numbers and computing the average of numbers) write a program that reads an unspecified nu

Interrupt System Based on Single 8259 A The 8259A is contained in a 28-pin dual-in-line package that need only a + 5-V supply voltage.  Its organization is shown in given figur

$NOMOD51 $NOSYMBOLS ;***************************************************************************** ; Spring 2013 Project ; ; FILE NAME : Project.ASM ; DATE : 3/30/20

RET : Return from the Procedure:- At each CALL instruction, the register IP and register CS of the next instruction is pushed to stack, before the control is transferred to the

Internal Hardware-Interrupts Internal hardware-interrupts are the outcome of sure situations that occur during the execution of a program, for example. Divide by 0. The interru

DMA DMA stands for Direct Memory Access It is uses same Address/Data lines on ISA bus It controls the ISA bus instead of the processor ("bus master") Floppy

There are 3 kinds of OCWs. The command word OCWI is utilized for masking the interrupt requests; when the mask bit corresponding to an interrupt request is value 1, then the requ

wap proram for bthe addition of two 3*3 matrix