This repository has been archived on 2019-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
s6-up-tp/TP1/TP10.pc
2017-05-02 07:47:48 +02:00

24 lines
470 B
PkgConfig

.equ PINA = 0x00 ; définition des adresses des ports
.equ DDRA = 0x01
.equ PORTA = 0x02
.equ RAMEND = 0x21FF
.equ SPH = 0x3E ; initialisation de la pile
.equ SPL = 0x3D
.org 0x000
; Vecteur RESET
jmp debut
.org 0x0080
debut:
ldi r16,0x01 ; config direction port A
out DDRA,r16
boucle:
in r16,PINA ; Lecture du port A
lsr r16 ; décalage vers la gauche : LED → bouton
out PORTA,r16 ; Écriture du port A
jmp boucle ; On recommence