.include "system/system.h65" .segment "CODE" ;******************************************************************************** ; Interrupts ;******************************************************************************** nmi: rti irq: .repeat 20 .endrepeat rti ;******************************************************************************** ; Reset sequence ;******************************************************************************** reset: sei ; setup io2 bank a 1-3 lda #%11111111 sta IO1 + IO_DDRA sta IO1 + IO_DDRB @loop: lda #%00000000 sta IO1 + IO_RA .repeat 3 nop .endrepeat lda #%11111111 sta IO1 + IO_RA .repeat 15 nop .endrepeat lda #%00000000 sta IO1 + IO_RB .repeat 5 nop .endrepeat lda #%11111111 sta IO1 + IO_RB .repeat 10 nop .endrepeat bra @loop ;******************************************************************************** ; reset vector ;******************************************************************************** .segment "RESET_VECTOR" .word nmi .word reset .word irq