From: silverdr; on Tuesday, January 08, 2013; at 5:08 PM -0500 > > Well-written programs may as well check for the C flag on return; > which is a sort of convention with many KERNAL routines. > Unfortunately, somebody "forgot" to add this to, e. g., OPEN call. Are you talking about the Kernal's function or BASIC's OPEN statement? (The Kernal's OPEN does set the Carry flag; and, BASIC does check it.) > >> I suspect that you had not seen that command-channel behavior >> before now because you always had done that tradition -- before now. > > You are very much right! But, there were also reasons for that. First, > back in the days I had one drive; and, if someone had two, he was > perceived as someone who doesn't know what to do with money. ;-) > This means I didn't really care about how many files I keep open > because the drive itself limited me more than anything else. Second > is that programming in a single-task environment didn't call for > releasing > resources ASAP. This came to me later. Today, a) being well used to > immediate release of resources, and b) having to deal at the same time > with three (each different) drives, uIEC, IDE64 (with two filesystems > mounted) means that keeping command channel open for all of them > (yes -- that's the case here) leaves hardly any room for actual data > files > being open on them. > > Anyway -- this is quite OT here. It actually isn't Off-Topic. People who want to deal with many drives and many files, as you did -- but, in C -- will need to know that CC65's CBM library does what I described: When the first file, on a particular mass storage unit, is openned, the library opens a status file, too. It keeps that status file open until all files, on that unit, have been closed. The library does that separately for each unit! The ROM KERNAL has a limit of 10 open files; but, CC65's CBM library has a limit of 8! And, that count can include stdin, stdout, and stderr. ---------------------------------------------------------------------- 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 Jan 10 01:09:29 2013
This archive was generated by hypermail 2.1.8 : 2013-01-10 01:09:32 CET