We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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 . . . }
You cannot put a variable into a register bank register, but you can place a variable into, for example, the accumulator. See: http://www.keil.com/forum/docs/thread1252.asp for an example.