]> git.sur5r.net Git - cc65/commitdiff
Use deferred VBI instead of immediate VBI. A deferred VBI won't be
authorChristian Groessler <chris@groessler.org>
Thu, 2 Jan 2014 20:45:12 +0000 (21:45 +0100)
committerChristian Groessler <chris@groessler.org>
Sat, 4 Jan 2014 19:33:24 +0000 (20:33 +0100)
called if the user program has interrupts disabled which makes it
easier to avoid race conditions.

libsrc/atari/irq.s

index 8ec1b12dfcc1ae0eccb24d418e778f4da4018f8b..9f12d47ed26a4a29119d8fde25b72a471baae8b5 100644 (file)
 .segment        "INIT"
 
 initirq:
-        lda     VVBLKI
-        ldx     VVBLKI+1
+        lda     VVBLKD
+        ldx     VVBLKD+1
         sta     IRQInd+1
         stx     IRQInd+2
-        lda     #6
+        lda     #7
         ldy     #<IRQStub
         ldx     #>IRQStub
         jsr     SETVBV
@@ -31,7 +31,7 @@ initirq:
 .code
 
 doneirq:
-        lda     #6
+        lda     #7
         ldy     IRQInd+1
         ldx     IRQInd+2
         jsr     SETVBV
@@ -44,7 +44,6 @@ doneirq:
 IRQStub:
         cld                             ; Just to be sure
 .ifdef __ATARIXL__
-        pha
 .ifdef CHARGEN_RELOC
         lda     CHBAS
         pha
@@ -64,7 +63,6 @@ IRQStub:
         sta     CHBAS
         sta     CHBASE
 .endif
-        pla
 .endif
         jmp     IRQInd                  ; Jump to the saved IRQ vector