]> git.sur5r.net Git - cc65/commitdiff
initcwd will be called from the upcoming __syschdir so it has to be moved out of...
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 10 Oct 2012 19:32:30 +0000 (19:32 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 10 Oct 2012 19:32:30 +0000 (19:32 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5844 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/cbm/Makefile
libsrc/cbm/devicestr.s [deleted file]
libsrc/cbm/initcwd.s

index fbcaeeeed417b535fafdf469249e7fe3577d9ba3..5e3396e13509cf764d7cdcaf3b434b0aa9b32a4a 100644 (file)
@@ -70,7 +70,6 @@ S_OBJS =      c_acptr.o       \
                ctype.o         \
                cvline.o        \
                 devicedir.o     \
-                devicestr.o     \
                 dir.o           \
                 diskcmd.o       \
                 exehdr.o        \
diff --git a/libsrc/cbm/devicestr.s b/libsrc/cbm/devicestr.s
deleted file mode 100644 (file)
index 15b4b6c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-;
-; Stefan Haubenthal, 2005-06-08
-;
-; CBM device to string
-;
-
-       .export         devicestr
-       .import         pusha0, tosudiva0
-       .importzp       sreg, ptr1, ptr2
-
-       .macpack        generic
-
-;------------------------------------------------------------------------------
-; Convert unit number in A into string representation pointed to by ptr2.
-
-.proc  devicestr
-
-       jsr     pusha0
-       lda     #10
-       jsr     tosudiva0
-       ldy     #0
-       lda     sreg
-       beq     :+              ; >=10
-       add     #'0'
-       sta     (ptr2),y
-       iny
-:      lda     ptr1            ; rem
-       add     #'0'
-       sta     (ptr2),y
-       iny
-       lda     #0
-       sta     (ptr2),y
-       rts
-
-.endproc
index 5f43bc86798860f6cc2fd64dff80ce59cb8fcf5b..d5eb7fb90a7ffc84b3b3585e4fab0979510e30ed 100644 (file)
@@ -4,19 +4,38 @@
 ; CBM _curunit to _cwd
 ;
 
-       .export         initcwd
-       .import         __curunit, __cwd, devicestr
-       .importzp       ptr2
+       .export         initcwd, devicestr
+       .import         __curunit, __cwd
+       .import         pusha0, tosudiva0
+       .importzp       sreg, ptr1, ptr2
 
-       .segment        "INIT"
-
-.proc  initcwd
+       .macpack        generic
 
+initcwd:
        lda     #<__cwd
        ldx     #>__cwd
        sta     ptr2
        stx     ptr2+1
        lda     __curunit
-       jmp     devicestr
+       ; Fall through
+
+;------------------------------------------------------------------------------
+; Convert unit number in A into string representation pointed to by ptr2.
 
-.endproc
+devicestr:
+       jsr     pusha0
+       lda     #10
+       jsr     tosudiva0
+       ldy     #0
+       lda     sreg
+       beq     :+              ; >=10
+       add     #'0'
+       sta     (ptr2),y
+       iny
+:      lda     ptr1            ; rem
+       add     #'0'
+       sta     (ptr2),y
+       iny
+       lda     #0
+       sta     (ptr2),y
+       rts