• Advertisement
Sign in to follow this  

Using NASM with VS 2010

This topic is 2410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anybody have any idea how to let Visual Studio 2010 assemble my assembly files with NASM? I have been searching but can't find it.

I have found solutions for Visual Studio 2008 but those won't work in the 2010 version.

Also, I have read about custom build rules, so I could add a custom build rule for NASM, but they look really complicated. Is there a tutorial or simple explanation about them?

Thanks in advance,
assaintor

Share this post


Link to post
Share on other sites
Advertisement
I didn't touch any pure assembly stuff for more than 6 years, so maybe my suggestion wont' work.

How about,

1, In Pre build, call NASM to assembly all your .asm files and generate .obj files. Maybe via a makefile so no need to build all .asm files each time.
2, Let VC compiles all non-asm stuff.
3, Let VC links the .obj files generated by NASM.

I can't test it since I only have VC 2008 Express.

If it won't work, how about put your .asm files to another project and generate .lib file and let VC links to it?

One off topic question, is it really necessary to use pure .asm files? Is the VC inline asm support not enough?

Share this post


Link to post
Share on other sites

I didn't touch any pure assembly stuff for more than 6 years, so maybe my suggestion wont' work.

How about,

1, In Pre build, call NASM to assembly all your .asm files and generate .obj files. Maybe via a makefile so no need to build all .asm files each time.
2, Let VC compiles all non-asm stuff.
3, Let VC links the .obj files generated by NASM.

I can't test it since I only have VC 2008 Express.

If it won't work, how about put your .asm files to another project and generate .lib file and let VC links to it?

One off topic question, is it really necessary to use pure .asm files? Is the VC inline asm support not enough?



Thanks for the responses!
I didn't think of using libraries, which is probably the best way.

@wqking: It's for learning purposes, I want to learn to program functions in asm that can be called from a C program.


@edd[sup]2[/sup]: No I haven't yet, first wanted to know if there was an easier solution. For now I'll settle on using libraries, when I've got more time I'll try to read the article and create a ruleset nasm.




EDIT:


I was to curious about rulesets so I used page edd[sup]2[/sup] suggested. I have it working for now. There are still some commandline options I have to include but I'm in no hurry.

Thanks edd[sup]2[/sup] for just giving me that little push I needed.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement