Passing argument to functions is simple when you have four or fewer non-floating-point arguments. You use rcx, rdx, r8, and r9 and provide shadow space on the stack before calling the function. After the call, you re-adjust the stack for the shadow space, and everything is fine. If you have more than four arguments, things are more complicated.
41. Functions in Windows
Get Beginning x64 Assembly Programming: From Novice to AVX Professional now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.