struggling for days now, can't see where i go wrong
hoping that someone points me to my stupid mistake i made

i have some D3DXVECTOR3 Directx9 structs

g_vecLook	D3DXVECTOR3 < 0.0, 0.0,-10.0>
g_vecRight D3DXVECTOR3 < 0.0, 0.0, 0.0>
g_vecUp D3DXVECTOR3 < 0.0, 1.0, 0.0>

Trying to substract the x y and z members

finit ; D3DXVec3Subtract g_vecRight-g_vecLook
fld  g_vecRight.x
fsub g_vecLook.x
fstp g_vecRight.x

the fstp triggers a crash
if i comment the fstp command it runs fine (without the calculation ofcourse)  :D

Thanks in advange for any help
Kind Regards
Posted on 2011-06-06 11:53:38 by jpam
In which section do the variables reside?

.code ; R/X
.data ; R/W
.data? ; R/W
.const ; R

btw, why not D3DXVECTOR4? Much shorter with SSE code, just ignore "w" member.
movups xmm0,g_vecRight
subps xmm0,g_vecLook
movups vecRight,xmm0

Posted on 2011-06-06 14:20:54 by drizz
oh yes !!!

they where under the .constant section !

i have put them under .data section and now it's working  :lol:

i did not know that under .constant you could not write to a variable

thanks drizz for clearing that up
Posted on 2011-06-06 18:22:29 by jpam

Did you end up Normalizing your vectors? :)
Posted on 2011-06-07 19:52:47 by Homer