Yes, well spotted Kent. I slipped back into 4 byte integer. In fact the = would not work either since the result is returned in the FPU. This is where overloading operators would be useful. If you dont mind RPN how about this:

Create_vector p1
var 8 x y z r
(
def to (
fstp qword %1
)
def + (
faddp st(1),st(0)
)
def squared (
fmul st(0),st(0)
)
def sqroot (
fsqrt
)


; try the methods
p1_getX to x
p1_getY to y
p1_getZ to z

p1_getX squared p1_getY squared p1_getZ squared + + sqroot to r


)