Is it possible to refer a C variable inside inline asm? for example, { char abc; #pragma asm MOV A, abc; #pragma endasm } after compile, I got a error at "MOV A, abc" variable abc is not recognized by Compiler. I know I can do this in C, I just wonder if there is a way to use variable in inline assembly. Thank you
you can, the question is can you refer an overlaid variable? Thai I do not know (see below) I do not use the ugly #pragma asm which require SRC and thus oblitterates the C code for the ICE; However if you rewrite the entire routine in assembler (recommended) in a separate module, you can use the OVERLAYABLE keyword for the local variables and THEN local variables are assembler accessible.