]> git.sur5r.net Git - cc65/commitdiff
DYNAMIC_DD support
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 16 Dec 2004 22:43:47 +0000 (22:43 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 16 Dec 2004 22:43:47 +0000 (22:43 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3334 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/crt0.s
libsrc/atari/ucase_fn.s

index 5c5607e0c9518825361e1d8c897d4b88d2640f83..cb5bd378afb474c614edc923772d81cd49e0843e 100644 (file)
@@ -16,6 +16,9 @@
                .import         zerobss, pushax
        .import         _main, __filetab, getfd
        .import         __CODE_LOAD__, __BSS_LOAD__
+.ifdef DYNAMIC_DD
+       .import         __getdefdev
+.endif
 
         .include        "zeropage.inc"
        .include        "atari.inc"
@@ -73,6 +76,9 @@ L1:   lda     sp,x
 ; Call module constructors
 
        jsr     initlib
+.ifdef DYNAMIC_DD
+       jsr     __getdefdev
+.endif
 
 ; set left margin to 0
 
index 2d609bb5c7a2110cce1c8dff7f201217baebf884..18d1be06a8f9626546343d80b5f793e82427e774 100644 (file)
@@ -20,6 +20,9 @@
 
 .ifdef DEFAULT_DEVICE
        .importzp tmp2
+.ifdef DYNAMIC_DD
+       .import __defdev
+.endif
 .endif
        .importzp tmp3,ptr4,sp
        .import _strupr,subysp
@@ -88,7 +91,11 @@ loop2:       lda     (ptr4),y
        lda     #':'
        sta     (sp),y          ; insert ':'
        dey
-       lda     #'0' + DEFAULT_DEVICE 
+.ifdef DYNAMIC_DD
+       lda     __defdev+1
+.else
+       lda     #'0'+DEFAULT_DEVICE
+.endif
        sta     (sp),y          ; insert device number
        dey
        lda     #'D'