制表函数 Y=3.3\*log(2)(x^2+1)
无法登录 masm64。我到底如何在我的代码中应用 fyl2x?我不知道在哪里应用这段代码。基本上是程序崩溃,或者数据不正确。这是我的代码:
\`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\`
尝试了这个解决方案: FLD1 FLD X FYL2X
但我不明白如何在我的代码中应用它!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个代码:
Try this code: