2 ; Ullrich von Bassewitz, 28.09.1998
4 ; IRQ routine for the 610.
7 .export irq, nmi, k_irq, k_nmi
8 .import k_scnkey, k_udtim, k_rs232
14 ; -------------------------------------------------------------------------
15 ; This is the mapping of the active irq register of the 6525 (tpi1):
19 ; | | | ^ SRQ IEEE 488
26 ; -------------------------------------------------------------------------
37 lda $104,x ; Get the flags from the stack
38 and #$10 ; Test break flag
45 ; -------------------------------------------------------------------------
55 ; -------------------------------------------------------------------------
56 ; Kernal irq entry point. The IRQvec points here (usually).
59 lda IndReg ; Ind. Segment retten
65 lda (tpi1),y ; Interrupt Register 6525
68 ; -------------------------------------------------------------------------
71 cmp #%00000001 ; ticker irq?
73 jsr k_scnkey ; Poll the keyboard
74 jsr k_udtim ; Bump the time
76 ; -------------------------------------------------------------------------
79 irq1: cmp #%00010000 ; interrupt from uart?
81 jsr k_rs232 ; Read character from uart
83 ; -------------------------------------------------------------------------
86 irqend: ldy #tpiActIntReg
87 sta (tpi1),y ; Clear interrupt