Need help to write an assembly language program.
I'm pretty new to ALP. I need to write a program to find the total, minimum and maximum of 10 numbers. I sort of have the part to find the total as can be seen below.
I need to know how to add on to that to find the minimum and maximum number.
Re: Need help to write an assembly language program.
Make two variables (memory locations, or registers, whichever you prefer) equal to the first number; one represents minimum number found so far and the other represents maximum so far. As you loop over the numbers, if the current one is bigger than "maximum so far", then set "maximum so far" equal to "current one", and similar for "minimum so far". At the end of the loop these two variables will contain the smallest and largest numbers in the data set.
|All times are GMT +5.5. The time now is 22:51.|