Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;nastaveni portu D a C
- ldi temp,0b11110000
- out ddrd,temp
- loop:
- ldi temp,0b01110000 ;1. řádek
- rcall klav
- ldi temp,0b10110000 ;2. řádek
- rcall klav
- ldi temp,0b11010000 ;3. řádek
- rcall klav
- ldi temp,0b11100000 ;4. řádek
- rcall klav
- klav: out portd,temp
- ori temp,0b00001111
- nop
- nop
- in key,pind ;čtení portu D
- nop
- nop
- cp key,temp
- brne typklav ;když odlišný - stisk
- ret
- typklav:mov typkey,key ;zápis klávesy
- set ;zápis stisku
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement