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.

How to access the stack variables with inline asm instructions?

Is this not a way to access the stack variables in the inline asm statement? It assembles but could not resolve the variable _a. Please suggest a way to achieve what I want. Thanks

Sayee 

foo()

{

int16 a;

 asm("MOVZ DP, #_a");

 

 asm("MOV @_a, #16");

}