Quote Originally Posted by B1ackAnge1 View Post
For this sample it indeed doesn't matter because you have basicallyu
0, string, string , 0

But when coding in asm I always tend to use Stdcall
so Function(A,B,C) would be
push C
Push B
push A
Call Function.

The function itself would know in which order to pop from the stack, hence why a lot of times when dealing with DLLs etc in C++ you'd see 'Extern C' which is basically saying: the functions in the dll are expecting their data to be passes using stdcall

stdcall != cdecl but that's too much typing righ tnow
from what I appear to think I remember(holy crap, even that sounds confusing o__O)
cdecl would be like:
Function(A,B,C)
push A
Push B
push C
Call Function.

I guess ill have to search the almighty wikipedia, as im starting to doubt ;(

Edit:
The almighty wikipedia makes me look dumb... I'll have to edit that article to make me look smart
Quote Originally Posted by wikipedia
The cdecl calling convention is used by many C systems for the x86 architecture. In cdecl, function parameters are pushed on the stack in a right-to-left order. Function return values are returned in the EAX register (except for floating point values, which are returned in the x87 register ST0). Registers EAX, ECX, and EDX are available for use in the function.

For instance, the following C code function prototype and function call:

Code:
int function_name(int, int, int);
int a, b, c, x;
...
x = function_name(a, b, c);
will produce the following x86 Assembly code (written in MASM syntax, with destination first):

Code:
push c
push b
push a
call function_name
add esp, 12 ;Stack clearing
mov x, eax
Quote Originally Posted by wikipedia
syscall

This is similar to cdecl in that arguments are pushed right to left. EAX, ECX, and EDX are not preserved. The size of the parameter list in doublewords is passed in AL.

Syscall is the standard calling convention for 32 bit OS/2 API.
Quote Originally Posted by wikipedia
optlink

Arguments are pushed right to left. The three lexically first (leftmost) arguments are passed in EAX, EDX, and ECX and up to four floating-point arguments are passed in ST(0) through ST(3), although space for them is reserved in the argument list on the stack. Results are returned in EAX or ST(0). Registers EBP, EBX, ESI, and EDI are preserved.

Optlink is used by the IBM VisualAge compilers.
Quote Originally Posted by wikipedia
stdcall

The stdcall[1] calling convention is a variation on the pascal calling convention in which parameters are passed on the stack, pushed right-to-left. Registers EAX, ECX, and EDX are designated for use within the function. Return values are stored in the EAX register. The callee is responsible for cleanup of the stack.

Stdcall is the standard calling convention for the Microsoft Win32 API and for Open Watcom C++.