From: cpg Date: Thu, 16 Dec 2004 22:46:28 +0000 (+0000) Subject: rename defdev to __defdev and export it; add support for X-Git-Tag: V2.12.0~500 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=47054d90d32a1c4db27ec02b4f825ac022046808;p=cc65 rename defdev to __defdev and export it; add support for DEFAULT_DEVICE and DYNAMIC_DD git-svn-id: svn://svn.cc65.org/cc65/trunk@3336 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/atari/getdefdev.s b/libsrc/atari/getdefdev.s index 23d638444..7712684aa 100644 --- a/libsrc/atari/getdefdev.s +++ b/libsrc/atari/getdefdev.s @@ -1,5 +1,5 @@ ; -; Freddy Offenga & Christian Groessler, June 2004 +; Freddy Offenga & Christian Groessler, December 2004 ; ; function to get default device: char *_getdefdev(void); ; @@ -17,11 +17,18 @@ .include "atari.inc" .import __dos_type .export __getdefdev ; get default device (e.g. "D1:") +.ifdef DYNAMIC_DD + .export __defdev +.endif ; Get default device (LBUF will be destroyed!!) __getdefdev: +.ifdef DEFAULT_DEVICE + lda #'0'+DEFAULT_DEVICE + sta __defdev+1 +.endif lda __dos_type ; which DOS? cmp #ATARIDOS beq finish @@ -62,21 +69,21 @@ crvec: jsr $FFFF ; will be set to crunch vector ldy #COMFNAM ; COMFNAM is always "Dn:" lda (DOSVEC),y - sta defdev + sta __defdev iny lda (DOSVEC),y - sta defdev+1 + sta __defdev+1 ; Return pointer to default device -finish: lda #defdev +finish: lda #<__defdev + ldx #>__defdev rts .data ; Default device -defdev: +__defdev: .byte "D1:", 0