]> git.sur5r.net Git - cc65/commitdiff
Fixed a bug
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 20 Dec 2002 20:39:24 +0000 (20:39 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 20 Dec 2002 20:39:24 +0000 (20:39 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1795 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/em/em_unload.s

index d9cb53a9f76f29264cba49dc3ea241702d775709..8c47ef061cac420919025b7652ffef1046e53b95 100644 (file)
@@ -9,9 +9,6 @@
         .include        "em-error.inc"
         .include        "modload.inc"
 
-       .import         return0
-
-
 _em_unload:
        lda     _em_drv
        ora     _em_drv+1
@@ -23,7 +20,12 @@ _em_unload:
         ldx     _em_drv+1
         jsr     _mod_free               ; Free the driver
 
-       jmp     return0
+        lda     #0
+        sta     _em_drv
+        sta     _em_drv+1               ; Clear the driver pointer
+
+        tax
+        rts                             ; Return zero
 
 no_driver:
        tax                             ; X = 0