Article Preview
Buy Now
COLUMN
Calling conventions
Issue: 6.3 (March/April 2008)
Author: Christian Schmitz
Author Bio: Christian Schmitz is the creator of the Monkeybread Software REALbasic Plugins.
Article Description: No description available.
Article Length (in bytes): 6,172
Starting Page Number: 41
Article Number: 6320
Related Web Link(s):
http://en.wikipedia.org/wiki/X86_calling_conventions
Excerpt of article text...
In this article we discuss calling conventions. If a function is called in any programming language there must be some convention about how to call the function. The calling convention defines how parameters are passed to the called function. Also it defines who cleans the stack when the function returns. The stack is the memory where functions store temporary data. If you declare a local variable in a method, this variable is put on the stack. The space for this variable is released when your method finishes.
Function parameters can be passed by registers or as parameters on the stack. Some calling conventions mix the two techniques depending on how many parameters are passed. The floating point and the integer registers are used depending on the values.
...End of Excerpt. Please purchase the magazine to read the full article.