
In the Name edit control, enter a new file name that has a. In the Add New Item dialog box, select C++ file (.cpp) in the center pane. On the menu bar, choose Project, Add New Item. Choose OK to save your selection and close the dialog box. In the Visual C++ Build Customization Files dialog box, check the checkbox next to masm(.targets.props).

On the menu bar, choose Project, Build Customizations. To add an assembler-language file to an existing Visual Studio C++ project It's one way to overcome the lack of an 圆4 inline assembler. You can then link these object files to your C++ code built for 圆4 targets. MASM fully supports 圆4 assembler-language source files, and builds them into object files. The Visual Studio project system supports assembler-language files built by using MASM in your C++ projects. Add an assembler-language file to a Visual Studio C++ project For information on available intrinsics, see Compiler Intrinsics. The Microsoft C++ compiler supports intrinsics to allow you to use special-function instructions, for example, privileged, bit scan or test, interlocked, and so on, in as close to a cross-platform manner as possible. To port your x86 code that uses inline assembler to 圆4 or ARM64, you can convert your code to C++, use compiler intrinsics, or create assembler-language source files. Inline assembler or use of the ASM keyword isn't supported for 圆4 or ARM64 targets.

For information on how to start a developer command prompt, see Build C/C++ code on the command line.įor information on ml64.exe command-line options, see ML and ML64 Command-Line Reference. A developer command prompt sets the required path and other environment variables.

To use ml64.exe on the command line, start a developer command prompt for 圆4 targets. If you only want the command-line tools, not the full IDE, download the Build Tools for Visual Studio. For instructions on how to download and install a copy of Visual Studio, see Install Visual Studio. The MASM tools aren't available as a separate download. The MASM command-line tools are installed when you choose a C++ workload during Visual Studio installation. Named ml64.exe, it's the assembler that accepts 圆4 assembler language. Visual Studio includes both 32-bit and 64-bit hosted versions of MASM (the Microsoft Macro Assembler) to target 圆4 code.
