Reputation: 2687
i am trying to understand how these operations work ...
for example if i have a stack with values
5.0 , 2.0 , 3.0 , 8.0
ST0 , ST1 , ST2 , ST3
what are the results of these operations ?
1, fadd 2, fmul 3, fst ST1
i find out that fadd and fmul takes the ST0 and ST1 and execute the operation ... so the results are
1, 7.0 , 3.0 , 8.0
2, 10.0 , 3.0 , 8.0
am i right ? :)
also i have no idea what is "fst" doing and how it works ... so if someone can explain it for me on this example it would be very helpful ...
thank you very much
Upvotes: 1
Views: 2764
Reputation: 58792
You should read the intel instruction set reference to understand what each instruction does. In addition I recommend Simply FPU because it's an awesome tutorial.
Also, you could just run the thing in a debugger and see what's happening for yourself:
Upvotes: 1
Reputation: 14215
I'm not aware of a no-argument fadd
or no-argument fmul
.
fst ST1
copies ST0
to ST1
.
Upvotes: 0