jj, i think i got it:
finit ; important: set 64-bit precision
fld MyR10
xor esi, esi
.Repeat
add dword ptr MyQW, 1
adc dword ptr MyQW[4], 0
fild MyQW
ftst
fstsw ax
sahf
jae @F
fld my64 ;FP10(18446744073709551616.0) ; add 2^64
fadd
@@:
fcomip ST, ST(1)
you must not act on the sign bit of the float, you act on the sign bit of the qword. The above code passes all my tests so far ...
Which leaves the question, how exactly does it work, what does adding 2^64 do bitwise, so that the comparison yields a correct result - something like a two´s complement insde the FPU ?
JK