program to find largest number using z80 simulator
I would like to ask on how to write z80 code to find the largest number such as the number 23 in a table of numbers eg. 8,9,10,23,14 using z80 codes. the largest number should be located in a specific memory address.
My idea for this is as the program reads the number,it will hold the 1st number(8) and move to the next number(9). since 9 is larger than 8,it will remove 8 from the address and 9 will be inserted. this process will continue till the end of the number i.e.14..
anyone can share their expertise on this? really appreciate it..Thanks :)