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
11 .include "zeropage.inc"
16 ; -------------------------------------------------------------------------
17 ; This is the mapping of the active irq register of the 6525 (tpi1):
21 ; | | | ^ SRQ IEEE 488
28 ; -------------------------------------------------------------------------
39 lda $104,x ; Get the flags from the stack
40 and #$10 ; Test break flag
47 ; -------------------------------------------------------------------------
57 ; -------------------------------------------------------------------------
58 ; Kernal irq entry point. The IRQvec points here (usually).
61 lda IndReg ; Ind. Segment retten
67 lda (tpi1),y ; Interrupt Register 6525
70 ; -------------------------------------------------------------------------
73 cmp #%00000001 ; ticker irq?
75 jsr k_scnkey ; Poll the keyboard
76 jsr k_udtim ; Bump the time
78 ; -------------------------------------------------------------------------
81 irq1: cmp #%00010000 ; interrupt from uart?
83 jsr k_rs232 ; Read character from uart
85 ; -------------------------------------------------------------------------
88 irqend: ldy #tpiActIntReg
89 sta (tpi1),y ; Clear interrupt