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

From: Rhialto <rhialto_at_falu.nl>
Date: Wed, 2 Jan 2013 01:20:53 +0100
Message-ID: <20130102002053.GA5766@falu.nl>
On Tue 01 Jan 2013 at 16:34:55 +0100, silverdr@wfmh.org.pl wrote:
> 
> On 2012-09-24, at 20:40, Spiro Trikaliotis wrote:
> 
> > The 154x and 157x drives can handle up to 3 simultaneous open files
> > (except the directory), with one exception: A relative file counts for
> > two files, making it one relative file and one sequential ("normal")
> > file only.
> 
> How does one check which channels are in use? For sequential one can
> read the SAT table, which should show the (ORed with $60 - why?) sec
> address aka channel but what about REL? Is there a reliable method for
> deriving number and numbers of channels already in use?

I can't quickly find my copy of Inside Commodore DOS, but there is
probably a table mapping secondary addresses to channels and channels to
buffers, or something like that. Another way to find out if a specific
buffer is free, is to try to open it: open 1,8,sa,"#2" to check buffer
2. Maybe that would be a way to find out what you want to know?

Ah, BUF0 and BUF1 (00A7-D resp. 00AE-F4) are each explained as "Table of
channel #'s assigned to each of the buffers. $FF is inactive buffer",
although a note in the margin says "LINDX -> buf#" which contradicts
that. (A Logical INDeX is a sort of DOS-internal file number).
The note makes more sense because there are indeed sometimes two buffers
assigned to a LINDX.

$022B-3D LINTAB maps secondary addresses to a status: $FF is inactive,
other values are read, write, or read/write.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl    -- 'this bath is too hot.'


       Message was sent through the cbm-hackers mailing list
Received on 2013-01-02 01:00:03

Archive generated by hypermail 2.2.0.