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

Assign variables to specified registers for inline asm???

Hi,
I want to assign variables of a C file to specified registers for indirect addressing in assembler. Here is a example:

void Function (void) interrupt 0 using 1
{
   unsigned char i; // at r0
   .
   .
   // doing something in c
   .
   .
   #pragma asm
       .
       .
       // doing something in assembler
       .
       mov a, @r0
       .
   #pragma endasm
   .
   .
   .
}

Thanks.
Benny

0