Exercice 7 : Programme chenillard sur les leds du port B
Initi
PORT EQU $1XXX
LDAA #$01
A <— 1
Gauche
Gauche:
STAA PORTB
BSR TEMPO
A —> PORTB LSLA
CMPA #$80
BNE Gauche
Temporisation BRA Droite
Droite:
Décalage de STAA PORTB
A vers la gauche BSR TEMPO
LSRA
CMPA #$01
A=$80? BNE Droite
BRA Gauche
Droite
TEMPO:
LDAB #$0F
A —> Encore:
PORTB DECB
CMPB #$00
BNE Encore
RTS
Temporisation
END
Décalage de
A vers la droite
A=$01?