User forums > Using Code::Blocks

Can RC1 handle inline assembly yet?

(1/4) > >>

brandon8863:
Just looking at the latest release and wondering if CodeBlocks can handle inline assembly code within a C++ project yet.

Thanks,

B--

Urxae:
As long as the compiler you're using supports it, I don't see what the problem would be.
Separate assembly files might be a problem because a different executable has to be started to 'compile' it but inline assembly is in the C(++) source file, so the same compiler executable is used as for the rest of that file.
Of course, things like code completion may not work for inline assembly.

EDIT: maybe I misunderstood what you meant by 'handling' inline assembly?

brandon8863:
Something like this:


--- Code: ---
#endif
}
else
{
GLfloat *start = (GLfloat *) &((unsigned char *) g.m_colorary)[i*g.m_colorstride];
static float two55 = 255.f;
unsigned int R, G, B, A;

#ifdef _X86_
__asm {
mov ebx, start;
fld [ebx];
fld [ebx + 4];
fld [ebx + 8];
fld [ebx + 12];
fld two55;
fmul st(1), st(0);
fmul st(2), st(0);
fmul st(3), st(0);
fmulp st(4), st(0);...

--- End code ---

'Inline assembly code' meaning the use of assembly code inline or flowing with C++?

B--

Urxae:
I know what inline assembly is, but I don't understand what you meant when you asked if Code::Blocks can 'handle' it? If you put it in the source file, and the compiler you use supports it, what's the problem?
Maybe I should rephrase my question: what do you think would Code::Blocks have to do to 'handle' inline assembly?
Support assembly code in codecompletion? syntax highlighting? something else? all of the above?

PS: Code completion and syntax highlighting would probably be a bit difficult to handle correctly, as the syntax is rather compiler-dependant and Code::Blocks supports multiple compilers. AFAIK there's not really an ISO standard for inline assembly in C(++).

brandon8863:
Ahh, sorry for not being specific enough.

On the features list from the main CodeBlocks page it says this:

Imports MSVC projects and workspaces
   (NOTE: assembly code and inter-project dependencies not supported yet)

I was wondering if the 'Assembly code' part had been supported yet.

Thanks for the quick responses BTW.

B--

Navigation

[0] Message Index

[#] Next page

Go to full version