We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi Forum Members, I am using Keil uVision2 for P89C51RD2HBP. I want to access the "global variables defined in C" in assembly routine. The format of my program is as below:
#include <stdio.h> unsigned char Var1; void Func1 (void) { ... ... #pragma asm mov a,Var1 #pragma endasm ... ... }
It looks exactly the same to me! It's different in the interrupt and using options chosen --- but those are quite irrelevant for the problem at hand, which of course is that the OP didn't bother to read the docs. Are you two guys in the same class?! Worse --- they're the same guy, actually ;-)