Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Microsoft x64 calling convention

The rulebook for function calls on 64-bit Windows - only four register arguments, rcx, rdx, r8 and r9, plus 32 bytes of reserved stack.

The Microsoft x64 convention passes the first four arguments in rcx, rdx, r8, r9 (by position), the rest on the stack above 32 bytes of shadow space, returns in rax, treats rbx, rbp, rdi, rsi, rsp and r12-r15 as callee-saved, and has no red zone.

Examples

  • Integer arguments go in rcx, rdx, r8 and r9, then on the stack, and the caller reserves 32 bytes of shadow space.

Read the full section →