Monday, September 13, 2010

How to return a complex return value?

Programmer Question

Hi awesomes~



Currently I am writing some assembly language procedures. As some convention says, when I want to return some value to the caller, say an integer, I should return it in the EAX register. Now I am wondering what if I want to return a float, a double, an enum, or even a complex struct. How to return these type of values?



I can think of returning an address in the EAX which points to the real value in memory. But is it the standard way?



Many thanks~~~



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails