Hello
I try to work with Fpu but i cannot get the correct result what is wrong?
.const
mb REAL4 1048576.0f
.data
Bytes qword 200000000
.data?
qwBytes qword ?
.code
fld Bytes
FDIV mb
fstp qwBytes
invoke crt_printf,chr$ ("%.2f Bytes"),qwBytes
And how i can get the remainder with fdiv in eax edx?
Regards
It would seem that you know absolutely nothing about the fpu nor of its instructions.
I would thus strongly recommend that, before you attempt using fpu instructions, you start by looking at a relevant tutorial such as the one available in the MASM32 SDK in its /tutorial/fputute subdirectory. If you don't have the SDK, you can view and/or download that tutorial from
http://www.ray.masmcode.com/fpu.html
Thanks Raymond for this Tutorial
Jochen have told me the solution i for integer fild Bytes :t
Hi,
ragdog!
Quote.data
Bytes qword 200000000
.data?
qwBytes qword ?
.code
fld Bytes <-- may be fild ?
Sorry, I later saw the answer
QuoteJochen have told me the solution i for integer fild Bytes :t
Quote from: Mikl__ on December 31, 2015, 12:37:57 PM
Hi, ragdog!
Quote.data
fld Bytes <-- may be fild ?
Sorry, I later saw the answer
QuoteJochen have told me the solution i for integer fild Bytes :t
Sorry, but that was not the only mistake in four lines of code. That's why I strongly suggested the tutorial.
Although I'd knew the FPU workings for many moon's, I only started seriously using it after going through Raymond's tuts :t
Now I crunch Reals like a breakfast serial.. :icon_mrgreen:
Raymond.. ever thought of doing something similar for MMX/XMM/SSE.. etc
;)
QuoteSorry, but that was not the only mistake in four lines of code. That's why I strongly suggested the tutorial.
Right Ray and your Tutorial is good :t