Contador modulo 256 con retardo

.include “m16def.inc”

.def aux1= r17
.def aux = r16
.equ cont1=0×60
.equ cont2=0×62
.equ cont3=0×63

.org 0×00
ldi aux,low(ramend)
out spl,aux
ldi aux,high(ramend)
out sph,aux
ldi aux1,0xff
out ddrb,aux1
;config pueto b

clr aux1
main:

out portb,aux1
inc aux1
call retardo
cpi aux1,255
brlo main
; iniciando el stack pointer
retardo:
ldi aux,25
sts cont1,aux
carga_cont2:
ldi aux,47
sts cont2,aux

lds aux,cont1
dec aux
sts cont1,aux
brne paso1
rjmp final

paso1:
ldi aux,255
sts cont3,aux

lds aux,cont2
dec aux
sts cont2,aux
brne paso2
rjmp carga_cont2

paso2:
lds aux,cont3
dec aux
sts cont3,aux
brne paso2
rjmp paso1

final:

ret

No response to “Contador modulo 256 con retardo”