title: gcc inline assembler get error "lvalue required in asm statement"
body: <p>I need to write the C-code that does</p>
  
  <pre><code>DDRB &amp;= ~pins;
  </code></pre>
  
  <p>with inline assembly (AVR). I never used it before. My attempt:</p>
  
  <pre><code>register uint8_t t1, t2; // temporary registers
  __asm__ volatile (
      "in %[t1], %[w1_ddr]"   "\n\t"
      "mov %[t2], %[pins]"    "\n\t"
      "com %[t2]"             "\n\t"
      "and %[t1], %[t2]"      "\n\t"
      "out %[w1_ddr], %[t1]"  "\n\t"
      : [t1] "+r" (t1),
        [t2] "+r" (t2),
        [w1_ddr] "+I" (_SFR_IO_ADDR(DDRB))
      : [pins] "r" (pins)
  );  
  </code></pre>
  
  <p><code>gcc</code> gives the following error <code>lvalue required in asm statement</code>. What am I doing wrong?</p>