Add provisions to open a disk directory using open().

git-svn-id: svn://svn.cc65.org/cc65/trunk@5663 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-05-29 20:52:18 +00:00
parent 4663245219
commit 64d3d9e41f
2 changed files with 35 additions and 11 deletions

View File

@@ -15,7 +15,7 @@
.import addysp, popax
.import scratch, fnparse, fnaddmode, fncomplete, fnset
.import opencmdchannel, closecmdchannel, readdiskerror
.import fnunit
.import fnunit, fnisfile
.import _close
.importzp sp, tmp2, tmp3
@@ -158,7 +158,10 @@ common: sta tmp3
clc
adc #LFN_OFFS
ldx fnunit
tay ; Use the LFN also as SA
ldy fnisfile ; Is this a standard file on disk?
beq nofile ; Branch if not
tay ; Use the LFN also as SA for files
nofile: ; ... else use SA=0 (read)
jsr SETLFS ; Set the file params
jsr OPEN