MC6805 Instruction Set - Ipsia Moretto
MC6805 Instruction Set - Ipsia Moretto
MC6805 Instruction Set - Ipsia Moretto
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Esempio<br />
0001 PORTB EQU $01 ; Definisco indirizzo del Port B<br />
0009 TIMER EQU $09 ; Definisco indirizzo TCR (Timer)<br />
058F 15 01 BCLR 2, PORTB ; Spengo LED<br />
0591 0F 09 FC REPT BRCLR 7, TIMER, REPT ; Verifico lo stato del Timer e<br />
0594 14 01 BSET 2, PORTB ; Accendo LED<br />
; ripeto se tempo non scaduto<br />
AGAIN LDA TIMER ; Recupero stato del Timer<br />
BIT #$80 ; Maschero il Bit 7<br />
BNE AGAIN ; Se Bit 7 0 ritorno in ciclo<br />
LDA PORTB ; Recupero dato presente sul Port B<br />
AND #$FB ; Maschera AND sul bit 2<br />
STA PORTB ; Salvo Dato Modificato (spengo LED)<br />
BRA REPT ; Ritorno in ciclo<br />
29