There are two 32 bit numbers. The older 1 byte of these numbers is always 00. The bottom line is this, you need to find the Euclidean distance of these numbers byte-by-byte. Well, let's say these two numbers are $ 050703 and $ 060401. sqrt (($ 03- $ 01) ^ 2 + ($ 07- $ 04) ^ 2 + ($ 05- $ 06) ^ 2).
I wrote this function:
function test(a,b:integer):double; register; var d:integer; asm mov eax,a and eax,$FF mov d,eax fild d mov eax,b and eax,$FF mov d,eax fild d fsub fld st(0) fmul mov eax,a shr eax,8 and eax,$FF mov d,eax fild d mov eax,b shr eax,8 and eax,$FF mov d,eax fild d fsub fld st(0) fmul fadd mov eax,a shr eax,16 and eax,$FF mov d,eax fild d mov eax,b shr eax,16 and eax,$FF mov d,eax fild d fsub fld st(0) fmul fadd fsqrt end;
It seems I could make it easier. I would be grateful for any advice.