mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 15:29:46 +00:00
New function fndefunit.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3834 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
aea6afa2d3
commit
8440c13edd
@ -4,7 +4,7 @@
|
|||||||
; File name handling for CBM file I/O
|
; File name handling for CBM file I/O
|
||||||
;
|
;
|
||||||
|
|
||||||
.export fnparse, fnset, fnaddmode, fncomplete
|
.export fnparse, fnset, fnaddmode, fncomplete, fndefunit
|
||||||
.export fnunit, fnlen, fncmd, fnbuf
|
.export fnunit, fnlen, fncmd, fnbuf
|
||||||
|
|
||||||
.import SETNAM
|
.import SETNAM
|
||||||
@ -21,17 +21,17 @@
|
|||||||
; fnlen -> length of filename
|
; fnlen -> length of filename
|
||||||
; fnbuf -> filename including drive spec
|
; fnbuf -> filename including drive spec
|
||||||
; fnunit -> unit from spec or default unit
|
; fnunit -> unit from spec or default unit
|
||||||
|
;
|
||||||
|
; Returns an error code in A or zero if all is ok.
|
||||||
|
|
||||||
.proc fnparse
|
.proc fnparse
|
||||||
|
|
||||||
sta ptr1
|
sta ptr1
|
||||||
stx ptr1+1 ; Save pointer to name
|
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
|
jsr fndefunit
|
||||||
sta fnunit
|
|
||||||
|
|
||||||
; Check the name for a drive spec
|
; Check the name for a drive spec
|
||||||
|
|
||||||
@ -110,6 +110,16 @@ namedone:
|
|||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
; fndefunit: Use the default unit
|
||||||
|
|
||||||
|
.proc fndefunit
|
||||||
|
|
||||||
|
lda __curunit
|
||||||
|
sta fnunit
|
||||||
|
rts
|
||||||
|
|
||||||
|
.endproc
|
||||||
|
|
||||||
;--------------------------------------------------------------------------
|
;--------------------------------------------------------------------------
|
||||||
; fnset: Tell the kernal about the file name
|
; fnset: Tell the kernal about the file name
|
||||||
|
Loading…
Reference in New Issue
Block a user