.def a = R16
.def b = R17

  ldi a,3
  cpi a,4 ;a<4 gdw. a-4<0
  brlo b0 ;wenn kleiner 0 sprung b0
  cpi a,9 ;a>8 gdw. a-8>0 gdw. a-9>=0
  brsh b2 ;wenn C=0 also >=0
  ldi b,1 ;sonst a = 4..8
  rjmp end
b0:
  ldi b,0
  rjmp end
b2:
  ldi b,2
end: