]> git.sur5r.net Git - cc65/commitdiff
Set _oserror only on error.
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 1 Jun 2010 21:01:59 +0000 (21:01 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 1 Jun 2010 21:01:59 +0000 (21:01 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4679 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/apple2/rootdir.s

index a64bf75bbc68554d2318422adeea1f91d4f4cb54..baa4b445d3192ea8a19d7093fa1a64153a56749b 100644 (file)
@@ -28,7 +28,7 @@ _rootdir:
         lda    #ON_LINE_CALL
         ldx    #ON_LINE_COUNT
         jsr    callmli
-        bcs    :+
+        bcs    oserr
 
         ; Get volume name length
         ldy    #$00
@@ -46,7 +46,11 @@ _rootdir:
         lda    #$00
         sta    (ptr1),y
         
-        ; Return success or error
-:       sta    __oserror
+        ; Return success
+        tax
+        rts
+        
+        ; Return error
+oserr:  sta    __oserror
         ldx    #$00
         rts