6502-OS/test.s65

56 lines
1.2 KiB
Plaintext
Raw Normal View History

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