[Icc-430] ICC430 generating an invalid assembler instruction

Sergio Paulo Sider sergiosider at gmail.com
Sun May 6 09:53:50 PDT 2007


Hi Richard & All,

I got the following error when trying to compile a C program:

!E killme.s(xxx): invalid dst operand mode

the offender line is:

	mov R11, at R1

that is on the asm code the compiler created itself.

I removed all unnecessary code from the program just to clarify. The
single killme.c source is:

void update_ptr(char **s)
{
  while (*((*s)++)); //too many parenthesis?! ;-)
}

int proc_string(char* fullstring)
{
   char c;
   while (c=*fullstring++) {

      switch (c) {

        case 0x81: //simple delay
           //bla bla bla
           update_ptr(&fullstring);
           //bla bla bla
           break;

        default:
           putchar(c);
           break;
      }

   }
   return 0;
}

void main(void)
{
  proc_string("test""\x00""test2""\x00""test3");
}



I know I am not a genius C coder, but it seems the compiler should not
generate an invalid assembler instruction even if my C program looks
ugly...

(obs: using ICC430 V7.05A, feb,14,2007), standard - dongle version

Regards,
Sergio.



More information about the Icc-430 mailing list