]> git.sur5r.net Git - cc65/blobdiff - libsrc/mouse/mouse-kernel.s
Don't install the IRQ vector if mouse_install returns an error
[cc65] / libsrc / mouse / mouse-kernel.s
index 2318ef950aaec5823a7cf3c508488a9ddab6b691..9dc7d3b23dd1a5c81b73b988e2854aa03d7f4004 100644 (file)
@@ -91,9 +91,11 @@ _mouse_install:
         ldy     tmp1
         bpl     @L2
 
-; Call driver install routine
+; Call driver install routine and check for errors
 
         jsr     mouse_install
+        tay                             ; Test error code
+        bne     @L3                     ; Bail out if install had errors
 
 ; Install the IRQ vector if the driver needs it. A/X contains the error code
 ; from mouse_install, so don't use it.