Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .def lampe = r16
- .def x2 = r18
- .def x1 = r19
- .def x0 = r20
- LDI lampe, 0x01
- OUT DDRC, lampe
- schleife:
- OUT PORTD , lampe
- rcall warten
- CPI lampe,128
- breq rechts
- LSL lampe
- rjmp schleife
- rechts:
- LSR lampe
- OUT PORTD , lampe
- CPI lampe,1
- breq schleife
- ;LDI lampe, 0x01
- rjmp rechts
- warten:
- ldi x2, 20 // wie lange wir warten
- ldi x1, 0
- ldi x0, 0
- loop:
- subi x0, 1 // Subtrahier e1 von (x2 x1 x0)
- sbci x1, 0
- sbci x2, 0
- brcc loop // springe wenn Ergebniss >= 0
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement