Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly Language > Re: Function ca...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 4994 of 5097
Post > Topic >>

Re: Function calling convention for large return values ?

by Terence <tbwright@[EMAIL PROTECTED] > May 3, 2008 at 04:01 PM

Using what I know about and use, which is 16-bit ASM as an example,
which can be appliied to 4-byte words by extension,
If I call procedure W(a,b,c,d) as a function, then the MS standard
calling convention provides

SP+18 has the address of a
SP+14 has the address of b
SP+10 has the address of c
SP+06 has the address of d

The value of the result, or the address of this if not an integer, is
in AX (read eax)
And the return executed, unless the stack is going to be cleaned up by
the caller,  should be
RET 16
  or 4 times the number of argument addresses.
 




 1 Posts in Topic:
Re: Function calling convention for large return values ?
Terence <tbwright@[EMA  2008-05-03 16:01:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 20 4:11:00 CDT 2008.