AngelCode.com > Developer resources

Using NASM from within the Visual Studio IDE

You can let the Visual Studio IDE call NASM to assemble your file for you. This will make it easier to write your assembler routines together with the rest of your project. This is done by first including the .asm file into your project, and then under file view click with the right mouse button on the file and select Settings. Once in the settings dialog you should go to the Custom Build tab where you write the command line for compiling the file. For example:

c:\nasm\nasmw.exe -f win32 $(InputPath) -o debug\$(InputName).obj

In the Outputs control you write the path of the output file so that the linker can find it.

debug\$(InputName).obj

Now you can write and compile your programs as normal without having to switch between IDEs for the different parts of the program.

- Andreas Jönsson