-
Notifications
You must be signed in to change notification settings - Fork 85
/
irq1571.src
46 lines (36 loc) · 869 Bytes
/
irq1571.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.page
.subttl 'irq1571.src'
jirq pha ; save .a,.x,.y
txa
pha
tya
pha
lda icr ; chk for fast byte
and #8
beq irq_1
irq_0 lda fastsr
ora #$40 ; set byte in flag
sta fastsr
bne irq_2 ; bra
irq_1 lda ifr1 ; test for atn
and #2
beq 1$
bit pa1 ; clear (ca1)
lda #1 ; handle atn request
sta atnpnd ; flag atn is pending
1$ tsx ; check break flag
lda $0104,x ; check processor status
and #$10
beq 2$
jsr jlcc ; forced irq do controller job
2$ lda ifr2 ; test if timer
asl a
bpl 3$
jsr jlcc ; goto controller
3$
irq_2 pla ; restore .y,.x,.a
tay
pla
tax
pla
rti