This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use C variable in Assembly?

I am new in Keil C. Just write a test app to mix C & Assembly. I wonder I can't use "ax" vaiable in assembly. How could I modify this?

void test(void)
{

uint8 ax= 0x00;

#pragma asm
MOV DPTR,#ax
#pragma endasm

return;
}

Thanks in advance

0