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

Assignment Help:

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


Related Discussions:- Write an assembly program to find out largest number

Program, wap proram for bthe addition of two 3*3 matrix

wap proram for bthe addition of two 3*3 matrix

Assignment, 1. Write an assembly program that adds the elements in the odd ...

1. Write an assembly program that adds the elements in the odd indices of the following array. Use LOOP. What is the final value in the register? array1 DWORD 10, 20, 30, 40, 50, 6

StrNCpyAsm, ;StrNCpyAsm - copy zero terminated string2 to zero terminated s...

;StrNCpyAsm - copy zero terminated string2 to zero terminated string1, ; but copy no more than count (parameter) characters ; or the length of string2, whi

Cache controller-microprocessor, Cache controller The cache controller ...

Cache controller The cache controller is the mind of the cache.  Its responsibilities include:  performing the  snarfs and snoops, updating the  TRAM  and SRAM and implementing

Instructions, Difference between div and idiv

Difference between div and idiv

General data registers-microprocessor, General Data Registers Given fig...

General Data Registers Given figure indicate the register organization of 8086. The registers DX, CX, BX and AX are the general purpose 16-bit registers. AX is behaved as 16-bi

8088 associated with 8259 a-microprocessor, For an 8088 the 2 addresses lin...

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

Program to add contents in memory-machine level programs, Example : Add th...

Example : Add the contents of the 2000H: 0500H memory location to contents of 3000H: 0600H and store the result in 5000H: 0700H. Solution : Unlike the past example progra

Shr-sar-logical instruction-microprocessor, SHR : Shift Logical Right: Thi...

SHR : Shift Logical Right: This instruction performs bit-wise right shifts on the operand word or byte that might be reside in  a memory location or a register, by the specified c

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd