From 8440c13edd28dde46df114f80169f24f02f499ac Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 13 Apr 2008 14:49:16 +0000 Subject: [PATCH] New function fndefunit. git-svn-id: svn://svn.cc65.org/cc65/trunk@3834 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/cbm/filename.s | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/libsrc/cbm/filename.s b/libsrc/cbm/filename.s index 4189bdefa..af1249647 100644 --- a/libsrc/cbm/filename.s +++ b/libsrc/cbm/filename.s @@ -4,7 +4,7 @@ ; File name handling for CBM file I/O ; - .export fnparse, fnset, fnaddmode, fncomplete + .export fnparse, fnset, fnaddmode, fncomplete, fndefunit .export fnunit, fnlen, fncmd, fnbuf .import SETNAM @@ -21,17 +21,17 @@ ; fnlen -> length of filename ; fnbuf -> filename including drive spec ; fnunit -> unit from spec or default unit - +; +; Returns an error code in A or zero if all is ok. .proc fnparse sta ptr1 stx ptr1+1 ; Save pointer to name -; For now we're always using the default unit +; For now we will always use the default unit - lda __curunit - sta fnunit + jsr fndefunit ; Check the name for a drive spec @@ -110,6 +110,16 @@ namedone: .endproc +;-------------------------------------------------------------------------- +; fndefunit: Use the default unit + +.proc fndefunit + + lda __curunit + sta fnunit + rts + +.endproc ;-------------------------------------------------------------------------- ; fnset: Tell the kernal about the file name -- 2.39.5