what's wrong with my inline assembly program
hi all, I am trying to use inline assembly code in my program, but the mov instruction does not work.
my code: Quote:
Quote:
|
What assembly language are you using? X86?
[EDIT]Here, read this: http://www.ibiblio.org/gferg/ldp/GCC...-HOWTO.html#s2 Seems to me you're missing a \t |
Quote:
I have fix it with this: Code:
#define CPU_ID(cpu_iid) \ Code:
#define CPU_ID_R(cpu_iid) \ |
I haven't used inline assembly in some time, but if I recall correctly, #defining stuff like that isn't such a hot idea, as preprocessor directives bypass the error and syntax checking of the compiler. All it's really doing is copy-pasting the macro into the locations where it's being called. Probably safer to write it into its own method. As for the error itself, I'd take a closer look at your syntax. Try using the Intel style. The code is cleaner and it's easier to find errors. See the following link for an example:
http://www.cplusplus.com/forum/beginner/3280/ Beyond that, I couldn't say. Hopefully there's someone else better versed in assembly here. Otherwise, I'd ask on the cplusplus.com forums, or one of the many assembly forums out there . . . |
In your other thread, you suggested you were compiling for an Alpha.
Q: (also asked above): Quote:
|
All times are GMT -5. The time now is 06:24 AM. |