Answer the question
In order to leave comments, you need to log in
How to hardcode variable values in C at compile time?
For example, there is such code
int main()
{
//int a = ?
//int b = ?
asm("add r10, %0, %1", : :"r"(a), "r"(b));
return 0;
}
How to set variables a and b as numbers at compile time?
Answer the question
In order to leave comments, you need to log in
Through preprocessor directives. #define and all that. And by the way, as far as I know, it's right to hardcode.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question