;...... ;variabel .equ zeitx = 65535 ;im Deklarationsteil oben angeben ;...... wait1: ;Wiederholtes Aufrufen von unten angeg. push temp ;Verzoegerungsschleife push temp1 push temp2 in temp2, SREG push temp2 ldi temp, 0x0A ;variabel ; wait1b: rcall wait ; wait1c: dec temp cpi temp, 1 brne wait1b nop pop temp2 out SREG, temp2 pop temp2 pop temp1 pop temp ret ; wait: ;Verzoegerungsschleife: push xl ; push xh push temp ;Sichern von Registern push temp1 ;und Statusregister auf Stapel push temp2 in temp2, SREG push temp2 ldi xl, low(zeitx) ;laedt Zaehlregisterpaar ldi xh, high(zeitx) ;mit oben deklariertem Wert... rjmp repeatx ;..."zeitx" ; repeatx: ;16-Bit-Subtraktionsschleife: sbiw xl:xh, 1 ;decrementiert Doppelregister brne repeatx ;zaehlt bis Null pop temp2 ;Wiederherstellung out SREG, temp2 ;von "geretteten" Registern pop temp2 pop temp1 pop temp pop xh pop xl ret