__cdecl, __stdcall and __fastcall are all called the exact same way?
I am using Visual C++ 2010, and MASM as my x64-Assembler. This is my C++ code: // include directive #include "stdafx.h" // functions extern "C" int Asm(); extern "C" int (convention) sum(int x, int y) { return x + y; } // main function int main() { // print asm printf("Asm returned %d.\n", Asm()); // get char, return _getch(); return EXIT_SUCCESS; } And my assembly code: ; external functions extern sum : proc ; code segment .code Asm proc ; create shadow space sub rsp, 20o ; setup parameters mov ecx, 10 mov edx, 15 ; call call sum ; clean-up shadow space add rsp, 20o ; return ret Asm endp end