The C compiler defines the calling convention, so the assembly code will have to follow it in order to be callable from C. Check the backend chapter of the compiler manual (pdf) for the calling convention used.
The assembler manual also contains a "Mixed C and Assembler Applications" chapter, but you still need to read the calling convention description in the compiler manual too.
Daniel