| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
| Message-Id: | <4.3.2.7.2.20020422131623.00bd4110@mail.ciudad.com.ar> |
| X-Sender: | rgrela AT mail DOT ciudad DOT com DOT ar |
| X-Mailer: | QUALCOMM Windows Eudora Version 4.3.2 |
| Date: | Mon, 22 Apr 2002 13:20:43 -0300 |
| To: | djgpp AT delorie DOT com |
| From: | "R. Grela" <rgrela AT ciudad DOT com DOT ar> |
| Subject: | djgpp, nasm and floats |
| Mime-Version: | 1.0 |
| Reply-To: | djgpp AT delorie DOT com |
Hello everybody!
I'm trying to do some calculations in assembly and return the results to
djgpp application..
I've no trouble returning integers (32 bits) in eax, but with floating I
get -NaN (not a number)
global _atest
section .data
p dd 0.2
section .text
_atest:
mov eax, [p]
ret
and receiving as float (I've tryed with double too)
extern "C" float atest();
void main() { float f = atest(); cout << f << endl; }
and I get -NaN
Any idea?
Thanks in advance!
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |