Re: Cursory analyses of CBM readdir bug (was: [cc65] Re: readdir bug)

From: <silverdr1wfmh.org.pl>
Date: 2013-01-01 16:10:29
On 2012-09-24, at 10:05, Oliver Schmidt wrote:

>> Even
>> worse, the routine is so much confused because other variables have been
>> rewritten that it even outputs the directory header again.
> 
> Just to be sure - this is an issue specific to the directory read
> routine. It is in general possible to successfully open several files,
> right?

Shame to say how many years already I always thought so ;-)

But...

10 open 1,8,2,"textfile,s,r"
20 if st then 100
30 get#1, a$
40 print a$;
50 goto 20
100 print st
110 close 1

A simple SEQ text file reading to screen - everything works as expected. But try this (at least on a 64/1541), which is nothing really special for a use case - just opening (and closing!) the command / status channel in addition to data file:

10 open 1,8,2,"textfile,s,r"
15 open 2,8,15
17 close2
20 if st then 100
30 get#1, a$
40 print a$;
50 goto 20
100 print st
110 close 1

Of course I hit that wall in a huge chunk of spaghetti asm code, not in those few lines of BASIC above, so you can imagine.. 

-- 
SD!----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jan 1 16:10:45 2013

This archive was generated by hypermail 2.1.8 : 2013-01-01 16:10:50 CET