Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have never used FPU instructions so I am starting from scratch. I am aware that there are 8 registers 80bit wide and they are ordered like a stack. That is about it. I have been trying to add 2 decimal numbers together but not getting the correct result.
My FASM code:
section '.text' code readable executable
cinvoke printf, decimalnum, num3
invoke ExitProcess, 0
section '.data' data readable writable
decimalnum db "%.4E",0
num1 dq 2.345
num2 dq 5.678
num3 rq 1
section '.idata' import data readable writeable
library msvcrt, 'msvcrt.dll',
What am I doing wrong?
0 · ·