This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
Hello,
I'm currently writing an inline assembly that puts the values in a register on the stack.
In general, function symbols are converted to addresses, and it seems that assembly language is used like this:
__asm(" MOVL #0x3333, ACC");
Assuming that the name of the function symbol I want to use is "Function_name", I want to store the value of the register as a symbol as follows.
__asm(" MOVL_Function_name, ACC");
__asm(" MOVL ptr[_Function_name], ACC") in gcc; It seems to be used as.
I'm curious how to store values as symbols in TI.
Thanks, Regards
Han
Sorry.
It's a global variable, not a function.
You can think of it as having declared Function_name as a global variable.
In addition, I wonder if there is a difference between the assembly used, whether it is a function symbol or a global variable symbol.
Thanks
Unfortunately, the asm statement in the TI C28x compiler does not support what you have attempted to do. GCC style asm statements are not supported. For more detail, please search the C28x compiler manual for the sub-chapter titled The __asm Statement.
Please consider these alternatives. Compiler intrinsics provide a way to access unusual C28x instructions from C. For more detail, please search the same compiler manual for the sub-chapter titled Using Intrinsics to Access Assembly Language Statements. Or, you may need to perform the unusual operation in a hand-coded assembly function. For more information about using such a function with C code, please search the same compiler manual for the sub-chapter titled Interfacing C and C++ With Assembly Language.
Thanks and regards,
-George