>From 'info gcc',
 ...

   You can prevent an `asm' instruction from being deleted, moved
significantly, or combined, by writing the keyword `volatile' after the
`asm'. 

Changing the code fragment to
  ...
  dtostrf(cos_rad,6,3,&line4[14]);
  line3[20] = ' ';
  line4[20] = ' ';
  asm volatile("sbi 0x1b,4" : :);         
  atan_rad = atan2(cos_rad,sin_rad);  
  asm volatile("cbi 0x1b,4" : :);         
  dtostrf(atan_rad,6,3,&line4[26]);     
  ...

does not alter the result.

The .elf code is incorrect!


_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to