The calling conventions are summarized in the following table.
Directive Order Cleanup Registers
register Left-to-right Function Yes
pascal Left-to-right Function No
cdecl Right-to-left Caller No
stdcall Right-to-left Function No
The register convention is by far the most efficient, since it often avoids the
creation of a stack frame. The pascal and cdecl conventions are mostly useful for
calling routines in dynamic-link libraries written in C, C++, or other languages.
The stdcall convention is used for calling Windows API routines.