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 ... ... }
Hi Forum Members, I also would like to know how to deal with a similar problem in the following code :
/* The Model used is Large */ #include <stdio.h> unsigned char Var1; void Func1 (void) interrupt 1 using 2 { ... ... #pragma asm mov a,Var1 #pragma endasm ... ... }
"a similar problem" Simlar? It looks exactly the same to me! Are you two guys in the same class?!
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 ;-)
View all questions in Keil forum