For efficiency,i have to use inline assembly in my code, but I failed to access local variables My code is something like this:
void func(void) { unsigned int i; i=0; #pragma asm MOV A,i #pragma endasm }
but i get a error : error A45: UNDEFINED SYMBOL (PASS-2)
So i there and way to solve this problem
Yes!
As already suggested and illustrated, create an assembler function; in an assembler source file.
The real question here is: why does the OP need to remove those two instructions. If the OPs code is so, that it will not work with those 4? cycles spent, there is more problems than what is posted