LED's - 2

https://www.ituenix.de/html/vid/IMG_4274.mov

.include "m8def.inc"

ldi r16, HIGH (RAMEND)
out SPH, r16
ldi r16, LOW (RAMEND)
out SPL, r16

ldi r16, 0xff
out DDRB, r16


ldi r16, 0x00
loop1:
com r16
out PORTB, r16
com r16
rcall sleep
inc r16
rjmp loop1

sleep:
push r16
push r17
ldi r16, 0x00
sleep_loop1:
ldi r17, 0x00
sleep_loop2:
inc r17
cpi r17, 0xff
brne sleep_loop2
inc r16
cpi r16, 0xff
brne sleep_loop1
pop r17
pop r16
ret
https://www.ituenix.de/html/vid/IMG_4275.mov