IRQ handler for UP9600

This commit is contained in:
FeralChild64 committed 2019-11-22 17:35:17 +01:00
1 parent df1285e5f3
commit 6f010b8c56
9 files changed
+138 -14

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
//
// RS-232 IRQ handler part
//
// Based on UP9600 code by Daniel Dallman with Bo Zimmerman adaptations
#if CONFIG_RS232_UP9600
up9600_irq:
lda CIA1_ICR // $DC0D
lsr
lsr // move bit 1 (timer B flag) into Carry
and #$02 // test SDR (shift register) status
beq up9600_irq_continue
ldx RINONE
beq !+ // skip if not waiting for empty SDR
dex
stx RINONE
!:
bcc up9600_irq_end
up9600_irq_continue:
rts
up9600_irq_end:
pla
pla
jmp return_from_interrupt
#endif // CONFIG_RS232_UP9600