Code: Select all
Procedure.f distance(xx.f,yy.f)
!fld dword[esp] ;push xx to FPU stack (to st0)
!fmul st0,st0
!fld dword[esp+4] ;push yy value to FPU stack (to st0) (xx is now in st1)
!fmul st0,st0
!faddp
!fsqrt
EndProcedure
cx1=13:cx2=782:cy1=345:cy2=286
xx.f=cx2-cx1:yy.f=cy2-cy1
DisableDebugger
tt=gettickcount_()
!finit
For t=1 To 10000000
distance(xx,yy)
Next
EnableDebugger
Debug gettickcount_()-tt
Debug ""
;Debug result ;<---- **THIS**
Debug distance(cx2-cx1,cy2-cy1)



