Author Topic: Compiling x86 assembly instructions  (Read 7071 times)

Offline johne53

  • Regular
  • ***
  • Posts: 253
Compiling x86 assembly instructions
« on: September 18, 2009, 02:05:32 pm »
I'm moving a project to C::B (currently, it builds using a command-line utility called scons). One of the modules has the extension ".s" and it seems to be standard x86 assembly language (lots of push / pop / mov instructions etc). When I add this file to my C::B project it gets grayed out. In other words, C::B doesn't seem to know how to build it. Scons handles it like this:-

g++ -c libs/sse/sse_functions.s -o libs/sse/sse_functions.o

So obviously, g++ knows how to build the module. Would C::B know what to do if I changed the extension to something else?

[Edit...] BTW, I tried the extension ".asm" but that wasn't recognised either....  :(
« Last Edit: September 18, 2009, 02:52:05 pm by johne53 »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Compiling x86 assembly instructions
« Reply #1 on: September 18, 2009, 07:41:20 pm »
I just tried adding a .s file to a project with a very simple instruction, and it compiled. What version of Code::Blocks are you using?

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Compiling x86 assembly instructions
« Reply #2 on: September 18, 2009, 08:40:59 pm »
Thanks, you just beat me to it! I just realised that this does work if I add ".s" files to my copy of C::B that runs under Linux (with the gcc compiler selected). But it doesn't work if I do the same thing with my copy of C::B that runs under Windows (Cygwin/gcc compiler selected). I just see a message saying "nothing to do". Both versions of C::B are quite old - though strangely, I think the Windows version is probably newer. I wonder if I should upgrade to something more recent?

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Compiling x86 assembly instructions
« Reply #3 on: September 19, 2009, 09:57:49 am »
Hmmm.... this morning it seems to be working (after a fashion). Late yesterday I discovered that I could build the file by opening it in my C::B editor and pressing Ctrl+Shift+F9. But it didn't get included if I just built the project by pressing Ctrl+F9. Also, if I right click on the filename (in the left-hand tree window) the usual popup menu appears but it doesn't have the "build file" option that I normally see with other source files.

The popup menu problem is still the same this morning (i.e. somewhere along the line, this file isn't getting recognised as a valid source module). However, Ctrl+F9 now seems to be building it... ???