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

From: <silverdr1wfmh.org.pl>
Date: 2013-01-11 03:13:27
On 2013-01-11, at 03:09, silverdr@wfmh.org.pl wrote:

>>> Thus, the only way to find out if the OPEN was successfull is to read
>>> the error channel, or (much easier): read the first byte. If the OPEN
>>> was not successfull, READST will return 0x42 (0x40 = EOF, 0x02 = time
>>> out).
>> 
>> Then, why this is not done in CC65 lib? (the "read the first byte" thing).
>> Seems a lot simpler than opening another channel, and you probably
>> will read at least one byte after opening.
>> 
>> Note that I don't know anything about C64 disk access :-)
> 
> I think Spiro referred to reading first byte off the status channel. Only '0' as the first character of status string denotes success. All actual errors start from 20 ('2' as first byte) upwards. This means you have to open and read the status channel anyway. Only a bit faster.

Or not - I think I misunderstood reading the first time - it's late already..

-- 
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 Fri Jan 11 03:13:38 2013

This archive was generated by hypermail 2.1.8 : 2013-01-11 03:13:42 CET