Can't log2 to masm64. How exactly do I apply fyl2x in my code? I can't figure out where to apply this piece of code. Basically, the program crashes, or incorrect data. Here is my code:
\`include win64a.inc
.data
\_x dq 3.0
\_op1 dq 3.3
\_op2 dq 1.0
\_zero dq 0.0
\_step dq 0.3
res1 dq 0
res2 dq 0
res3 dq 0
res4 dq 0
res5 dq 0
tit1 db "masm64.
Equation execution on coprocessor.",0
buf dq 5 dup(0)
ifmt db "Вывод результата Y=3.3\*log(2)(x^2+1):",10,10,"
Result: %d, %d, %d, %d, %d",0ah,0ah,
"Автор: Анатолий",0
.code
WinMain proc
sub rsp,28h; stack alignment 28h=40d=32d+8; 8 — return
mov rbp,rsp
finit
lea esi,res1
mov ecx, 5
fld1
m1: fld \_x
fmul \_x
fadd \_op2
fmul \_op1
fld \_x
fadd \_step
fstp \_x
loop m1
fisttp res1
fisttp res2
fisttp res3
fisttp res4
fisttp res5
invoke wsprintf,ADDR buf,ADDR ifmt, res5,res4,res3,res2,res1
invoke MessageBox,0,addr buf,addr tit1,MB_ICONINFORMATION;
invoke ExitProcess,0
WinMain endp
end\`
Tried this solution:
FLD1 FLD X FYL2X
But I don't understand how to apply this in my code!