einlesen: push temp1 push temp2 push temp3 push temp4 cbi portb,3 ; sclk sbic pinb,7 ; drdy jmp einlesend ldi temp3,8 ldi temp1,8 sbi portb,6 ;ao cbi portb,5 ;rfs einlesenhigh: lsl adhigh sbic pinb,2 ;sdata jmp einlesen2 sbi portb,3 cbi portb,3 cbr adhigh,1 dec temp3 cpi temp3,0 brne einlesenhigh jmp einlesenlow einlesen2: sbi portb,3 cbi portb,3 sbr adhigh,1 dec temp3 cpi temp3,0 brne einlesenhigh einlesenlow: lsl adlow sbic pinb,2 jmp einlesen3 sbi portb,3 cbi portb,3 cbr adlow,1 dec temp1 cpi temp1,0 brne einlesenlow jmp einlesend einlesen3: sbi portb,3 cbi portb,3 sbr adlow,1 dec temp1 cpi temp1,0 brne einlesenlow einlesend: cbi portb,6 sbi portb,5 pop temp4 pop temp3 pop temp2 pop temp1