I am in the process of porting an application from x86 to x64. I am using Visual Studio 2009; most of the code is C++ and some portions are plain C. The __asm keyword is not
.code PUBLIC getStackFrameADDR _getStackFrameADDR getStackFrameADDR: mov RAX, RBP ret 0 END
Something like that could work for you.
Compile it with ml64 or jwasm and call it using this in your code extern "C" void getstackFrameADDR(void);