]> git.sur5r.net Git - cc65/blob - libsrc/atari/irq.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / atari / irq.s
1 ;
2 ; IRQ handling (ATARI version)
3 ;
4
5         .export         initirq, doneirq
6         .import         callirq
7
8         .include        "atari.inc"
9
10 ; ------------------------------------------------------------------------
11
12 .segment        "INIT"
13
14 initirq:
15         lda     VVBLKI
16         ldx     VVBLKI+1
17         sta     IRQInd+1
18         stx     IRQInd+2
19         lda     #6
20         ldy     #<IRQStub
21         ldx     #>IRQStub
22         jsr     SETVBV
23         rts
24
25 ; ------------------------------------------------------------------------
26
27 .code
28
29 doneirq:
30         lda     #6
31         ldy     IRQInd+1
32         ldx     IRQInd+2
33         jsr     SETVBV
34         rts
35
36 ; ------------------------------------------------------------------------
37
38 .segment        "LOWCODE"
39
40 IRQStub:
41         cld                             ; Just to be sure
42         jsr     callirq                 ; Call the functions
43         jmp     IRQInd                  ; Jump to the saved IRQ vector
44
45 ; ------------------------------------------------------------------------
46
47 .data
48
49 IRQInd: jmp     $0000