Subject: Re: Reading another disk Newsgroups: comp.sys.apple2.programmer From: dempson@actrix.gen.nz (David Empson) Date: Fri, 24 Dec 1999 22:55:54 +1300 Message-ID: <1e3c8zc.1amdsmmg27sztN%dempson@actrix.gen.nz> References: <60B84.1978$aE3.224288@typhoon1.gnilink.net> Organization: Empsoft User-Agent: MacSOUP/2.4.2 NNTP-Posting-Host: 202.49.157.176 X-Original-NNTP-Posting-Host: 202.49.157.176 X-Trace: 24 Dec 1999 22:53:45 NZST, 202.49.157.176 Lines: 44 Path: lobby!newstf02.news.aol.com!portc05.blue.aol.com!portc04.blue.aol.com!newsfeed.mathworks.com!newsfeed.direct.ca!usenet.net.nz!news.iprolink.co.nz!news.actrix.gen.nz!dempson James wrote: > What is the command to read another disk, like when the computer asks, > "Please Enter Side 2 to Continue." It depends on what operating system you are talking about, and how the disk has been set up. With DOS 3.3, this is done by simply displaying the message, waiting for a keypress (by polling the keyboard in a loop, or using the GET command in BASIC), then attempting to read the appropriate file. 200 PRINT "Please insert the second disk" 210 PRINT "then press any key"; 220 GET A$: PRINT 230 PRINT D$;"RUN PART2" [or whatever command is appropriate] With ProDOS, if both disks have the same volume name (like with AppleWorks Startup and Program, both of which are called "/APPLEWORKS") then it is generally done in the same way. If the disks have different names, then the program may attempt to read a file from the second disk without waiting for a keypress. If it gets a "volume not found" error, then it might decide to pause and ask the user to insert the appropriate disk. This allows a user with two drives to avoid the pause. The problem with this method is that tying the program to the name of the disk is somewhat restrictive, e.g. it makes it difficult to copy the program onto a hard drive. There are more advanced techniques, such as scanning through all online volumes looking for the desired file, but this is even more risky. With GS/OS, there is an automatic "please insert disk" dialog, which may be invoked automatically (I forget now; if not, there will be a special call to invoke it). This asks for a volume by its name. -- David Empson dempson@actrix.gen.nz Snail mail: P O Box 27-103, Wellington, New Zealand