title: Intel x86_64 assembly function calling conventions(linux, windows), stack arguments, stack manipulation
body: <p>I call assembly function from C (separate asm file), and pass 6 pointer arguments to it.</p>
  
  <p>In Linux(using Nasm) calling convention is : rdi, rsi, rdx, rcx, r8, r9 and rest on stack.
  In Windows (using Masm) calling convention is: rcx, rdx, r8, r9 and rest on stack.</p>
  
  <p>How can I address that rest on stack arguments on both platforms??
  I read 64 abi and microsoft msdn but I can't see clear answer how to use this arguments, all my tries ended up with segmentation fault.</p>
  
  <p>Another question is : is it necessary in MASM to do this :</p>
  
  <pre><code>push rbp
  mov rbp, rsp
  </code></pre>
  
  <p>at my assembly function beginning?(and of course reverse it at the end).</p>