User forums > Using Code::Blocks
Can RC1 handle inline assembly yet?
Funto:
--- Quote ---I don't know much about inline assembly as I never use it, but can you not use variable names and/or addresses in it?
--- End quote ---
That's what I was talking about when I said "code completion could be useful only with function names" ^^
As for opcodes, as you say they vary between Intel's and AT&T's syntaxes (mov versus movw for example), but on the other hand opcodes with more than 5 letters are very rare or even don't existe (at least with Intel's syntax), so there is no need for opcodes-autocompletion IMHO ^^
Urxae:
--- Quote from: Funto on August 01, 2005, 01:12:59 am ---
--- Quote ---I don't know much about inline assembly as I never use it, but can you not use variable names and/or addresses in it?
--- End quote ---
That's what I was talking about when I said "code completion could be useful only with function names" ^^
--- End quote ---
I know, I was just nitpicking about functions vs. variables. They're different things, you know ;).
--- Quote ---As for opcodes, as you say they vary between Intel's and AT&T's syntaxes (mov versus movw for example), but on the other hand opcodes with more than 5 letters are very rare or even don't existe (at least with Intel's syntax), so there is no need for opcodes-autocompletion IMHO ^^
--- End quote ---
True I guess. But as I said, it might be nice if a hint is given as to what they actually do. At least for people who don't usually use assembly (At least not outside my two courses on compilers and embedded systems, neither of which used Intel or AT&T syntax).
Of course AFAIK C::B's code completion doesn't do that either, but it's a bit of a pet project of mine to change that using doxygen comments. Guess that didn't make much sense if you didn't know that (which you couldn't as I haven't mentioned it before).
Which reminds me, I really should work on that some more as I haven't for a few weeks now... :(
Funto:
--- Quote ---I know, I was just nitpicking about functions vs. variables. They're different things, you know
--- End quote ---
Of course, but it seems to me that we can either call C functions or use C variable inside inline assembly ^^
As for a little description of what does each opcode, that's a good idea and a feature no other IDE has IMHO ^^
thomas:
--- Quote from: Funto on August 01, 2005, 01:12:59 am ---
--- Quote ---I don't know much about inline assembly as I never use it, but can you not use variable names and/or addresses in it?
--- End quote ---
That's what I was talking about when I said "code completion could be useful only with function names"
--- End quote ---
You don't use gcc's extended assembly syntax? It is great, should really give it a look.
grv575:
It'll of course vary depending on the compiler (gcc uses gas i guess??? while vc++ toolkit will use masm syntax) and the platform compiled on. Also assembly languages are constantly changing as new processors come out so is more of a moving target than supporting C compiler library prototypes (really the reason C uses libraries for everything).
FWIW, the following compiles under CB set to VC++ toolkit:
#include <iostream>
int main()
{
int a;
__asm
{
xor eax,eax
mov a, 5
}
printf("%d\n", a);
return 0;
}
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version