Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .include "m2560def.inc"
- .cseg
- init:
- ldi r16,0xFA
- ldi r17,0b11101111
- ldi r18,0x03
- ldi r19,0x57
- out DDRB,r16
- main:
- ldi r16,0xFA
- ldi r17,0b11101111
- ldi r18,0x03
- ldi r19,0x57
- out PORTB, r16
- AND r17,r16
- out PORTB,r17
- cp r16,r17
- rjmp res
- noteq:
- out PORTB,r19
- rjmp main
- equal:
- out PORTB,r18
- rjmp main
- res:
- brne noteq
- breq equal
- rjmp main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement