Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .def i=r16
- .def variable=r17
- init:
- ldi tmp, LOW(RAMEND)
- out SPL, tmp
- ldi tmp, HIGH(RAMEND)
- out SPH, tmp
- loop:
- cpi i, 255
- brsh end_while
- cpi variable, 1
- brne end_if
- rcall i
- ldi variable, 0
- rjmp end_if
- end_if:
- mul i, 3
- cpi i, 255
- brsh end_if_2
- rcall i
- rjmp end_if_2
- end_if_2:
- cpi i, 255
- brsh end_while
- dec i
- rcall i
- brsh end_while
- end_while:
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement