어셈블리 포인트에 방정식을 구현하려고하는데 잘못된 대답을주고 있습니다.어셈블리의 방정식이 잘못된 대답
나는 그것을 caculater에 넣는다. 그리고 그것은 나에게 433.0127018를 준다. .. 그리고 나의 코드와 더불어 나는 0.0193269641235를 얻는다. 대답은 심지어 정확하지 않다. 그러나 can not는 그것이 틀린 aswer를주고있는 이유를 발견한다.
공식 :
initX=sin((degree+ (i∗dStep)) ∗pi/180) ∗ scale
변수 :
degree dd 0
dStep dq 120.0
scale dq 500.0
pi dq 3.14159265358979
oneEighty dq 180.0
initX dq 0.0
tmp dq 0.0
tmptmpdegree dq 0.0
코드 :
; initX=sin((degree+(i*dstep))*pi/180)*scale
movsxd r10,dword[degree]
cvtsi2sd xmm0,r10
movsd qword[tmpdegree],xmm0
movsd xmm1,qword[pi]
divss xmm1,dword[oneEighty]
movsd qword[tmp],xmm1
movsd xmm0,qword[tmpdegree]
addsd xmm0,qword[dStep]
mulsd xmm0,qword[tmp]
call sin
mulsd xmm0,qword[scale]
movsd qword[initX],xmm0
'i'을 잊어 버렸습니다. 추신 : 디버거를 사용하는 법을 배워보십시오. – Jester