As Weddington, Eric wrote: > int main () { > while (1) { > PORTC.OUT = 0x00; > PORTD.OUT = 0xff; > } > }
main: /* prologue: function */ /* frame size = 0 */ ldi r26,lo8(1600) ldi r27,hi8(1600) ldi r30,lo8(1632) ldi r31,hi8(1632) ldi r24,lo8(-1) .L2: adiw r26,4 st X,__zero_reg__ sbiw r26,4 std Z+4,r24 rjmp .L2 > And the corresponding flat register access: > > int main () { > while (1) { > PORTC_OUT = 0x00; > PORTD_OUT = 0xff; > } > } main: /* prologue: function */ /* frame size = 0 */ ldi r24,lo8(-1) .L2: sts 1604,__zero_reg__ sts 1636,r24 rjmp .L2 The structure-based code looks a little cumbersome but is IMHO correct. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev