.include "tn2313def.inc"

.def tmp = R16
.def merker = R17

init:
  out DDRD,tmp
  out PORTD,tmp
  ldi tmp,0xFF
  out DDRB,tmp
  out PORTB,tmp
atest:
  sbic PIND,6 ;wenn Taste A gedrueckt ueberspringe Befehl
  rjmp btest
  in merker,PIND
  andi merker,0x0F
btest:
  sbic PIND,5 ;wenn Taste B gedrueckt ueberspringe Befehl
  rjmp atest
  in tmp,PIND
  andi tmp,0x0F
  cp tmp,merker
  brne nein
  out PORTB,tmp
  rjmp atest
nein:
  ldi tmp,0xFF
  out PORTB,tmp
  rjmp atest 