flat assembler
Message board for the users of flat assembler.
Index
> Windows > Floating point help |
Author |
|
Overflowz 18 Sep 2011, 22:43
Here you go, some tutorial
http://www.website.masmforum.com/tutorials/fptute/index.html for FPU, there is no MOV instruction. instead, use FILD, FLD, FSTP, FBSTP etc.. I'm not prof at FPU but.. I'm going learn it too |
|||
18 Sep 2011, 22:43 |
|
NanoBytes 18 Sep 2011, 23:37
That is one question, but I still have no idea how i would output those values to the console?
|
|||
18 Sep 2011, 23:37 |
|
AsmGuru62 19 Sep 2011, 15:36
I learned from here (good stuff!):
http://www.website.masmforum.com/tutorials/fptute/index.html Go to chapter 6 - there is FBSTP instruction - using it you can convert data from FPU into text and then print on console. It is not easy! The only way to load 1.2 into FPU is to declare it and then load it: Code: value DQ 1.2 ... FLD [value] Or, you can get the same value by loading INTEGER 2 and then DIVIDING BY INTEGER 10 and then adding 1: Code: PUSH 2 FILD DWORD [ESP] PUSH 10 FIDIV DWORD [ESP] ADD ESP, 4+4 FLD1 FADDP But that would be brutal waste of CPU cycles! However, you saved 8 bytes for a constant declared in memory. Edit: wow! I posted same link as above - what are the chances!.. |
|||
19 Sep 2011, 15:36 |
|
dancho 20 Sep 2011, 07:55
well THE actual link is : ( Latest revision August 2009 )
http://www.ray.masmcode.com/tutorial/index.html and Ray's home page : http://www.ray.masmcode.com/ |
|||
20 Sep 2011, 07:55 |
|
AsmGuru62 20 Sep 2011, 18:55
Impressive!!! Ray was married before I was born!! Holy cow!
And I was considering myself a senior programmer! |
|||
20 Sep 2011, 18:55 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.