-
Notifications
You must be signed in to change notification settings - Fork 82
/
irq1541.src
55 lines (44 loc) · 875 Bytes
/
irq1541.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
47
48
49
50
51
52
53
54
55
.page
.subttl 'irq1541.src'
irq pha
txa
pha
tya
pha
lda icr
and #8
beq 1$ ; fast serial request
bit lock ; locked ?
bmi 1$
lda pota1 ; change to 2 Mhz
ora #$20
sta pota1
lda #<jirq
sta irqjmp
lda #>jirq
sta irqjmp+1 ; re-vector irq
lda #tim2 ; 8 ms irq's at 2 Mhz - controller irq's
sta t1hl2
sta t1hc2 ; adjust timers for 2 Mhz
lda #0
sta nxtst ; not a vector
jmp irq_0
1$ lda ifr1
and #2
beq 2$ ; not atn
jsr atnirq ; handle atn request
2$ lda ifr2 ; test if timer
asl a
bpl 3$ ; not timer
jsr lcc ; goto controller
3$ tsx
lda $0104,x ; check processor break flag
and #$10
beq 4$
jsr lcc
4$ pla ; restore .y, .x, .a
tay
pla
tax
pla
rti