The MASM Forum Archive 2004 to 2012

Project Support Forums => 64 Bit Assembler => Topic started by: msqweasm on May 24, 2011, 12:31:20 PM

Title: x64 Inline Assemblly Support In MS Visual C++
Post by: msqweasm on May 24, 2011, 12:31:20 PM
I know inline assembly is not longer available in visual c++ for x64.  But is it possible to achieve something similar in other ways. I want to add, say, just a few NOPs or other simple instructions in some particular places of my subroutines.  It could be just a simple way to experiment with a asm programming in the x64 environment.  Is it possible to do it in x64 at all?
Title: Re: x64 Inline Assemblly Support In MS Visual C++
Post by: Alloy on May 26, 2011, 12:06:36 PM
I think the only way so far is to use the Intel C compiler addon.
Title: Re: x64 Inline Assemblly Support In MS Visual C++
Post by: dedndave on May 26, 2011, 03:05:57 PM
or write a complete module in ASM that has your NOP's inserted   :P
Title: Re: x64 Inline Assemblly Support In MS Visual C++
Post by: qWord on May 26, 2011, 05:14:11 PM
Quote from: msqweasm on May 24, 2011, 12:31:20 PMIt could be just a simple way to experiment with a asm programming in the x64 environment.  Is it possible to do it in x64 at all?
Simply use Japhets jWasm+WinInc. Then you can use MSVCTR console functions for IO.
Also you can create a procedure/function using jwasm and then link the object file to your c++ program (which use this function). Createting an DLL is also an option.
Title: Re: x64 Inline Assemblly Support In MS Visual C++
Post by: Rockoon on May 27, 2011, 01:09:52 PM
Quote from: qWord on May 26, 2011, 05:14:11 PM
Also you can create a procedure/function using jwasm and then link the object file to your c++ program (which use this function). Createting an DLL is also an option.

Is there masm/jwasm source code for a simple 64-bit DLL floating around? With a function that takes a few parameters, and preferably without using any of the higher level masm niceties (no automatic function prolog/epilog) ??



Title: Re: x64 Inline Assemblly Support In MS Visual C++
Post by: Alloy on October 20, 2011, 03:22:37 AM
maybe this "x64 Assembly and C++ Tutorial 9_ Passing Integers to and from C++ and Assembly" at http://www.youtube.com/watch?v=0tpOEdxtRkA or "x64 Assembly and C++ Tutorial 27: Calling C++ from ASM" at http://www.youtube.com/watch?v=txFXiFafTTc&feature=mfu_in_order&list=UL can help.