For the record, here the essentials of an optimised version:
MyR10 REAL10 9223372036854775808.0 ; 2^63
MyQW QWORD 9223372036854775806 ; 2^63-2
...
fld MyR10
xor esi, esi
.Repeat
fild MyQW
test byte ptr MyQW[7], 128
.if !Zero?
fadd FP4(18446744073709551616.0) ; translate a negative number to its unsigned equivalent
.endif
fcomi ST, ST(1) ; could be fcomip, but we want to print the value
.if Zero?
PrintLine "equal"
.elseif Carry?
PrintLine Str$("ST=%i is smaller than ST(1)", ST(0))
.else
PrintLine Str$("ST=%i is bigger than ST(1)", ST(0))
.endif
fstp st
add dword ptr MyQW, 1
adc dword ptr MyQW[4], 0
inc esi
.Until esi>=5
Output:
ST=9223372036854775806 is smaller than ST(1)
ST=9223372036854775807 is smaller than ST(1)
equal
ST=9223372036854775809 is bigger than ST(1)
ST=9223372036854775810 is bigger than ST(1)