]> git.sur5r.net Git - cc65/blobdiff - libsrc/mouse/mouse-kernel.s
Added library reference mouse_libref to MOU interface.
[cc65] / libsrc / mouse / mouse-kernel.s
index 598b61ea2c5ee6cbd9f116733ed40b6c2eec7a34..2fa5b5e2d4d9a8bca7cf3b37b17a5343e4830074 100644 (file)
@@ -4,7 +4,7 @@
 ; Common functions of the mouse driver API.
 ;
 
-        .import         return0, popsreg, incsp2
+        .import         return0, popsreg, incsp2, mouse_libref
         .importzp       sreg, ptr1, tmp1, tmp2
         .interruptor    mouse_irq               ; Export as IRQ handler
 
@@ -64,6 +64,15 @@ _mouse_install:
         dey
         bpl     @L0
 
+; Set the library reference
+
+        ldy     #MOUSE_HDR::LIBREF
+        lda     #<mouse_libref
+        sta     (ptr1),y
+        iny
+        lda     #>mouse_libref
+        sta     (ptr1),y
+
 ; Reset flags
 
         lda     #1