NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: hhh3h on June 23, 2011, 06:21:37 PM
-
Greetings. A few months ago I was reading something on Wikipedia (I think) about what exactly gets returned from a function that you call in another assembly.
If I recall, it said that not just the value itself is returned, but other information as well, such as an integer indicating whether or not the function encountered an exception.
Well, unfortunately I cannot find that page and I am out of ideas as to what terms to search. I believe it is related to Calling Convention, Name Mangling, and Application Binary Interface (ABI) because those were the topics I was reading about when I came across this.
I was wondering if anyone knows what I'm talking about and can give me the correct term to search.
Thanks.
-
I guess you are talking about x86 (believe it or not that is not the only platform in the world :D ) but you didn't say Windows/Linux/Solaris/BSD/DOS/etc.
We discussed some of this recently here http://forum.nasm.us/index.php?topic=1119.0 Specifically, look for Keith's link to Agner Fog's (and they thought my name was funny) calling conventions guide. I call it linkage conventions and it's also part of any normal API definition but I'm not sure if that's what you are looking for or specific information for some platform/OS combo.
If you are asking about MVS on S/370 or later I can help. Otherwise somebody else here will!
-
Thanks for that link; it has some links within it that are quite informative. Specifically 1 (http://www.agner.org/optimize/calling_conventions.pdf) and 2 (http://www.delorie.com/djgpp/doc/ug/asm/calling.html).
I guess in regard to your architecture question, I was talking about x86 and/or x86-64; and in regard to OS, I was not interested in just one specific OS, but rather the differing conventions between each major OS (Win/Linux/BSD, etc).