Hi Dave,
I need to answer this way
1.
The code for all three (Mymin, Mymax, Myminmax) look good
Yes you are right
2.
except for one pesky problem
Well, let's go to see where is the problem !
3.
they will fail for exactly one entry in the array
Well, if THEY fail, Mymin fails (for example).
So we can talk about Mymin to be simple.
One note: Well you are saying but you dont prove nothing.
a) the array has 10 real4 numbers
b) Mymin starts with st(0)=MIN = element in ECX=0
c) It starts the loop with ECX=9
d) It starts comparing MIN with the element in [edx+ecx*4]
It means that we use the element in [edx+9*4] (=
the LAST)
e) It stops when ECX=0, it means "when ecx=0 doesnt loop"
So it is
evident,
obvious, that it uses ALL numbers in the array.
But if you have some doubts run it and print each ECX.
or try
array real4 2, 3, 4, -1 you should get MIN=-1
now try
array real4 2, 3, -1, 4 you should get MIN=-1
now try
array real4 2, -1, 3, 4 you should get MIN=-1
now try
array real4 -1, 2, 3, 4 you should get MIN=-1
4.
You need to insert "jnz L0 ret 8" in front of L0.
No
5.
I find FPU code hard to follow, I usually code it in C
It seems you have some problems in reading assembly. ;)
EDIT:
see the debug file