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

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

Parents
  • if the variable defined in C is in external memory other than internal 256 bytes, how can i access it in the assembly code written between C code using directives?
    or is there any way to access directly the register like R6,R7, A,B etc. in C outside assembly code?
    plz send if there is any solution.

    thanks and regards,
    Ashutish Tiwari
    Bangalore, India.

Reply
  • if the variable defined in C is in external memory other than internal 256 bytes, how can i access it in the assembly code written between C code using directives?
    or is there any way to access directly the register like R6,R7, A,B etc. in C outside assembly code?
    plz send if there is any solution.

    thanks and regards,
    Ashutish Tiwari
    Bangalore, India.

Children
No data