]> git.sur5r.net Git - cc65/blob - libsrc/gamate/irq.s
fix merge fxxxup
[cc65] / libsrc / gamate / irq.s
1 ;
2 ; IRQ handling (Gamate version)
3 ;
4
5         .export         initirq, doneirq, IRQStub
6
7         .import         __INTERRUPTOR_COUNT__, callirq_y
8
9         .include        "gamate.inc"
10         .include        "extzp.inc"
11
12 ; ------------------------------------------------------------------------
13 .segment        "INIT"
14
15 ; a constructor
16 ;
17 initirq:
18         rts
19
20 ; ------------------------------------------------------------------------
21 .code
22
23 ; a destructor
24 ;
25 doneirq:
26         rts
27
28 ; ------------------------------------------------------------------------
29 ; 256*32 interrupts in about 1minute 60s = 136hz
30 ; -> guess 16384 clock cycles = 135,28hz (might be audio signal 1/512?)
31
32 IRQStub:
33         ; A and Y are saved by the BIOS
34         ;pha
35         ;tya
36         ;pha
37
38         ldy     #<(__INTERRUPTOR_COUNT__ * 2)
39         beq     @L1
40
41         txa
42         pha
43
44         jsr     callirq_y
45
46         pla
47         tax
48
49 @L1:    ;pla
50         ;tay
51         ;pla
52         rts