send() system call using _asm and interrupt

This is a discussion on send() system call using _asm and interrupt within the C Programming forums, part of the General Programming Boards category; Hi,
I wrote the following code for send() [of socket.h],
Code:
char buffer[4];
strcpy(buffer, "hi");
__asm__("sub $16,%%esp\n"
"movl %%ebx,(%%esp)\n"
"movl ...

Usually you just push a function parameter. Though in MASM there is actually the invoke command which is kind of nifty. In either case, push is more standard. Though this is where calling convention comes into play (not so much for this C call as much as PASCAL calls).

And the purpose of NOT using the pre-defined Send() system call is what? Fiddling about with inline assembler for something that is defined in the system seems quite pointless to me.

Edit: One reason NOT to do this would be that the kernel MAY use SYSENTER or SYSCALL (as appropriate) to call the kernel, which will be faster than the INT 0x80 route. It is also not portable to a 64-bit architecture.

Edit2: Using push or pre-allocating the space on the stack is a matter of which processor it is for - some processors (like old 386/486 and early Pentium's) prefer to have one stack change and then offset used to store the arguments, whilst more modern processors (such as Athlon) actually perform better if you use push instructions to store to the stack - because that's what most compilers do, so the processor designers decided to make that part as fast as possible.