6502-OS/test.s65
matthias@rpi a63bd562d1 cleanup
2023-10-27 16:50:58 +02:00

56 lines
1.2 KiB
Plaintext

.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