regarding assignment

while combining C & assembly instructions, how do i assign value contained in any register like r6, r7 etc. to variable defined in C.
i did this is it right?

unsigned char myvalue;
# pragma asm
mov A, myvalue
add A, R6
mov myvalue, R6
#pragma endasm

plz tell me....

Ashutosh tiwari
Bangalore

More questions in this forum