]> git.sur5r.net Git - cc65/commitdiff
The IRQ handler needs to save the registers. By Stefan Haubenthal.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 4 Mar 2012 19:25:22 +0000 (19:25 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 4 Mar 2012 19:25:22 +0000 (19:25 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5574 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atmos/crt0.s

index 15aa9509a7740ca5923b6b6d9c6edf8f502deca5..bc11ce5d9283ccd906b0af4e718792284d61dc0e 100644 (file)
@@ -133,7 +133,17 @@ L2:        lda     zpsave,x
 
 IRQStub:
        cld                             ; Just to be sure
+       pha
+       txa
+       pha
+       tya
+       pha
        jsr     callirq                 ; Call the functions
+       pla
+       tay
+       pla
+       tax
+       pla
        jmp     IRQInd                  ; Jump to the saved IRQ vector
 
 ; ------------------------------------------------------------------------