.include    "m8def.inc"

Start:
    ldi     r16,0xFF
    out     DDRD,r16

    ldi     r16,0x00

    out     DDRB,r16

    ldi     r16,0xFF

    out     PORTB,r16

Loop:

    in      r16,PINB

    com     r16
    out     PORTD,r16
    rjmp    Loop