<<< Procedure Name Coordination | Index | Example Calling ASM Procedure from C++ >>> |
By default, Assembly programs use STDCALL calling convention for passing parameters.
When dealing with high-level languages, programmer needs to be aware of the calling convention used by that particular language.
Types of return values:
In Assembly language, everything is simple: the value is returned in the EAX register with two possibilities:
the value is either a number, or
a pointer to some variable or structure.
If the return value has the WORD data type, it is passed in the least significant word of the EAX register, namely, AX.
(When dealing with the C programming language, type casting of return value must be also considered.)
<<< Procedure Name Coordination | Index | Example Calling ASM Procedure from C++ >>> |