Calling Conventions: cdecl, stdcall, and System V
Compare the major x86 calling conventions so your assembly and C code agree on where arguments go, who cleans the stack, and which registers are preserved.
Why Conventions Matter
For assembly and C to interoperate, both sides must agree on a calling convention: how arguments are passed, who cleans the stack, and which registers must be preserved.
Argument Passing
Conventions differ on where arguments go: on the stack, in registers, or a mix. Getting this wrong corrupts data silently.
All lessons in this course
- Calling Assembly from C
- Calling C from Assembly
- Mixed-Language Programming Techniques
- Calling Conventions: cdecl, stdcall, and System V