[cc65] RE: [cc65-devel] Atari: IOCBs and failing OPENs

From: Shawn Jefferson <sjefferson1shaw.ca>
Date: 2013-07-05 07:54:56
I took a quick look at the source for the XL OS, and the IOCB close section
of the source ($E57C) seems to only call the close vector for the device
handler (so whatever DOS is going to do to close that IOCB), puts $FF in
ICHID and sets ICPTLZ/HZ to IIN (the OS IOCB not open vector). 

My view is that you should probably call the close vector, that way anything
that needs to be cleaned up will be, and by the proper mechanism for
whatever DOS or OS you happen to be running.

Maybe the smart folks at AA will have more insight.

> -----Original Message-----
> From: Christian Groessler [mailto:chris@groessler.org]
> Sent: Thursday, July 04, 2013 3:24 AM
> To: cc65 Development; cc65@musoftware.de
> Subject: [cc65-devel] Atari: IOCBs and failing OPENs
> Hi,
> I've found a long-standing bug in the Atari runtime, which could
> eventually cause "too many open files" errors when trying to open a file.
> I've posted this question also on the Atariage forum:
> The ICHID member of an IOCB can be used to detect if the IOCB is
> currently in use.
> $FF means "free", other values mean "in use".
> Now, when I try to open a file which does not exist, DOS returns an
> error (obviously), but ICHID is not $FF anymore.
> So, in order to free the IOCB again, do I need to call CLOSE? Or is it
> sufficient to manually write $FF to ICHID?
> regards,
> chris
> --------------------------------------------------------------------------
> ----
> This SF.net email is sponsored by Windows:
> Build for Windows Store.
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________________
> cc65-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cc65-devel

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 Jul 5 07:58:32 2013

This archive was generated by hypermail 2.1.8 : 2013-07-05 07:58:34 CEST