you can use the following Program to access R0 to R7 registers in Keil C
{
unsigned char R0Val;
_asm
MOV A, R0
MOV _R0Val, A
_endasm
}
OR
{
unsigned char R0Val;
#pragma ASM
MOV A, R0
MOV _R0Val, A
#pragma ENDASM
}
C variables have to be prefixed by '_' or underscore character, to be accessible in the assembly section of the C code.
Hope this helps.
2 comments:
Thanks for such very great information. This is the best sites for proving such kinds of good information. CG Vyapam Revenue Inspector Answer key
wonderful information and great site.thank you...
AP 10th board result 2017
Assam board HSLC result 2017
Arunachal Pradesh board 10th class result 2017
Bihar board Matric result 2017
CGBSE 10th result 2017
CBSE 10th class result 2017
Goa HSSC Result 2017
GSEB SSC result 2017
Post a Comment