Path: utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!ucbvax!UIAMVS.BITNET!AWCTTYPA From: AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") Newsgroups: comp.sys.apple Subject: support of ProDOS disk swapping Message-ID: <8903022345.aa13273@SMOKE.BRL.MIL> Date: 3 Mar 89 05:36:54 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 33 X-Unparsable-Date: Thursday 02 Mar 89 10:44 PM CT >Date: Tue, 28 Feb 89 21:39:00 EST >From: "Andy Tefft (814) 862-6728" >Subject: single-drive programs >[...] How hard is it to make a program say "volume not found. please >insert correct disk or press to exit" and wait for your answer, >INSTEAD of just saying "Volume not found" and ending!!? It's a little trickier than you might think, but it isn't all that bad. I'm talking about programs under ProDOS, by the way, not DOS 3.3. When a program does file operations through ProDOS or GS/OS, it does things like OPEN, READ, WRITE, and CLOSE. (I'm talking about OS-level commands here, but when you do them from BASIC.SYSTEM there is a fairly direct correspondence.) A file must be OPENed before it can be read from or written to. ProDOS does _not_ expect a disk to be removed while their are open files on it, and it will _not_ look in that drive for other volumes. So a program that needs to support disk swapping needs to CLOSE all open files after remembering where it was in each one (by doing GET_MARKs, perhaps), and later it needs to re-open the files and SET_MARK back to where it left off. Not a major pain, but not completely trivial, either. >Andy >art100@psuvm.bitnet / a1t@ecl.psu.edu --David A. Lyons bitnet: awcttypa@uiamvs DAL Systems CompuServe: 72177,3233 P.O. Box 287 GEnie mail: D.LYONS2 North Liberty, IA 52317 AppleLinkPE: Dave Lyons