News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Return values

Started by Lonewolff, March 18, 2016, 09:56:41 PM

Previous topic - Next topic

Lonewolff

Hi Guys,

I am having trouble trying to figure out how to make a 'double' return value type.

I have found some information that you need to use movsd and fld before the ret statement. But, I am having troubles actually implementing it.

Any advice would be awesome :)

jj2007

double is REAL8 in Masm syntax
returning a double works differently, see your C manual, or assemble this, launch Olly and press F8 until you see the result to the right

include \masm32\include\masm32rt.inc

.code
start:
  invoke crt_atof, chr$("123.456")
  exit

end start