Author Topic: Better way to use NASM in Code::Blocks projects?  (Read 9030 times)

nfries88

  • Guest
Better way to use NASM in Code::Blocks projects?
« on: February 03, 2014, 03:07:50 am »
I've been working on a piece that, for better or for worse, requires significant use of assembler (to the point that I'd have 20+ lines of inline assembly in a few different functions to do it in a C::B-compatible way), and have been using a customer project variable and custom build commands to build the assembler files with NASM:
$NASM $file -f win32 -o $object

Which is fine for me. Copying and pasting a string everytime I create a new file is no biggie. But since nasm can be installed wherever, other devs would need to edit my project file to change $NASM, and then I'd need to change it back, and so-on. This is highly undesirable.

Basically, is there a better way to make Code::Blocks build my assembly files with NASM?
(Also, is there a syntax highlighter for x86 assembly available? Not that there's much to highlight, but it's darn easy to typo SSE instructions)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: Better way to use NASM in Code::Blocks projects?
« Reply #1 on: February 03, 2014, 01:49:34 pm »
Read the stuff on this link.

http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system

Is that what you did?

If not, try doing it that way.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org