Re: [cc65] CLRCH necessary for the CBMs?

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2009-12-10 21:25:30
Hello Oliver,

* On Thu, Dec 10, 2009 at 07:29:32PM +0100 Oliver Schmidt wrote:

> > Ok, thanks a lot! I will then remove the calls to CLRCH from all Commodore
> > targets.
[...]
> >From that perspective it might be preferable to just comment-out the
> call with a notice that it is already done by the BASIC interpreter
> (thus serving as a hint to activate the call in a non-BASIC scenario).

To add to what Uz said: In general, the CLRCH(N) is not necessary at
all. You would only need it if

1. someone deliberately opened files and set input and output to that
   (CHKIN, CHKOUT in assembly, or CMD x in BASIC)

2. (possibly) if an error occurred in a previous command and the error
   handling code forgot to catch it and close the channels

No. 2 seems very unlikely to me, and no. 1 is exactly what Uz wants to
be able to achieve: Let the user be able to redirect input and output.

Thus, IMHO, the CLRCHN should go completely.

YMMV.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Dec 10 21:25:53 2009

This archive was generated by hypermail 2.1.8 : 2009-12-10 21:25:56 CET