💾 Archived View for mirrors.apple2.org.za › archive › ftp.gno.org › doc › FAQs › dos.txt captured on 2023-05-25 at 00:43:53.
-=-=-=-=-=-=-
From: nathan@visi.com (Nathan Mates) Newsgroups: comp.sys.apple2 Approved: news-answers-request@MIT.EDU Followup-To: comp.sys.apple2 Subject: Apple DOS & Commands Frequently Asked Questions (FAQ) Archive-name: apple2/doscmd Posting-Frequency: monthly Last-modified: February 8 1998 Version: 1.03 URL: http://www.visi.com/~nathan/a2/faq/dos.html Apple II DOS & Commands FAQ This document attempts to give a detailed and correct set of Apple II DOS command line commands, covering those found in official releases of DOS 3.3 and ProDOS. It may also get into usage notes, non-command line OSs (GS/OS), etc, eventually. Copyright (c) 1997 by Nathan Mates (email: nathan@visi.com), all rights reserved. This document can be freely copied so long as 1) it is not sold, 2) any sections reposted elsewhere from it are credited back to this FAQ with the FAQ's copyright info and official WWW location (http://www.visi.com/~nathan/a2/faq/dos.html) left in place. This FAQ may not be sold, bundled on disks or CD-ROMs, reprinted in magazines, books, periodicals, or the like without prior consent from the author and copyright holder, Nathan Mates. Exceptions are explicitly granted for Joe Kohn's Shareware Solutions II newsletter, and Jim Maricondo's Golden Orchard CD-ROM collection. Email me for permission otherwise. Further, please do NOT make a copy of this FAQ and post it on the web; I'm continually updating and fixing sections of it. A html link is fine. Disclaimer: I've tried to make this FAQ as accurate as possible, but there's the chance that it's not perfect. I apologize in advance for any slipups. Until I am confident that all information is 100% accurate, you are advised that you are following all info at your own risk. I will fix any problems found with this FAQ, but will not be held liable for the results of problems. Last-modified: February 8, 1998 Version: 1.03 Table of Contents Section 1: General Intro to this FAQ and the command line environment Section 2: History and features of DOS 3.x and ProDOS 2.1 History of DOS 3.x and ProDOS 2.2 Features of DOS 3.x 2.3 Features of ProDOS Section 3: Commands quick reference A listing of all commands, one per line, to facilitate finding the appropriate commands. Section 4: In depth explanation of commands, optional params 4.1 DOS 3.x file names and types 4.2 ProDOS file names and types 4.3 Extended command line parameters for DOS 3.x commands 4.4 Extended command line parameters for ProDOS commands 4.5 Detailed explanation of commands: -, APPEND, BLOAD, BSAVE, BRUN, BYE, CAT, CATALOG, CHAIN, CLOSE, CREATE, DELETE, EXEC, FLUSH, FP, FRE, IN#, INIT, INT, LOAD, LOCK, MAXFILES, MON, MTR, NOMON, OPEN, POSITION, PR#, PREFIX, READ, RENAME, RESTORE, RUN, SAVE, STORE, UNLOCK, VERIFY, WRITE Section 5: Miscellaneous questions and answers 5.1: Which OS am I in? 5.2: How do I format a disk? 5.3: How do I copy/move files/disks? 5.4: Can I put DOS 3.x on my hard disk? 5.5: Can I speed up DOS 3.3 or ProDOS? 5.6: What about file/disk undeletion? 5.7: How do I view a text file? 5.8: What does "UNABLE TO LOAD PRODOS" mean when I boot a disk? 5.9: How do I switch drives/disks? 5.10: I don't have an OS for my Apple II. Where do I get it from? _________________________________________________________________ Section 1: General Intro to this FAQ and the command line environment This FAQ attempts to be a reference for the commands supported by DOS 3.x (x=2, 2.1, or 3) and ProDOS at the command line level, as well as general usability issues. It does not cover where to acquire a copy and/or upgrade to any version of any OS; you should visit the comp.sys.apple2 Frequently Asked Questions (FAQ) at http://www.visi.com/~nathan/a2/faq/csa2.html section 7.2 and other referenced sections. Note that ProDOS does not have any command line support in the base OS; all command line functionality is part of the Applesoft BASIC environment provided by launching the 'BASIC.SYSTEM' 'System' file. Without BASIC.SYSTEM, ProDOS only has a Machine Language Interface (MLI) for interfacing with apps; during the rest of this FAQ, I have been lazy in referring to things as 'ProDOS' commands when they are ProDOS's BASIC.SYSTEM commands. Applesoft BASIC commands are not included in this FAQ; they have a FAQ of their own at http://www.visi.com/~nathan/a2/faq/asoft.html. This FAQ has a set of conventions as to items presented. Items presented in square brackets '[' ']' are optional. 'filename' is a legal filename for the OS being used, and for ProDOS, 'dirname' is a legal directory/path name, 'volname' is a ProDOS volume name. I list all commands in uppercase; DOS 3.x is case sensitive and commands must be uppercased. ProDOS is case insensitive, but for consistency, commands are still uppercased. _________________________________________________________________ Section 2: History and features of DOS 3.x and ProDOS 2.1 History of DOS 3.x and ProDOS Apple's DOS (Disk Operating System) was written to support their Disk ][ drive when it debuted in early 1978. Version numbers for software were not as strict as they are now; the code started at v0.1, and incremented that by 0.1 per revision. When delivered to Apple, it was at version 3.0, and after Apple was done with their last modifications, v3.1 was the first version shipped. As the disk drive was single sided, all support for Apple 5.25" disks has been singlesided only. With various bugfixes, DOS was at version 3.2.1 by 1979. These early releases supported only 13 sectors/track * 35 tracks for a total of 113.75K per disk side. With technological improvements to the disk interface card, 16 sectors could be fit in, for a total of 140K/side. DOS 3.3 was the revision capable of handling these 140K disks, and was released in 1980. ProDOS was comissioned to be the 'Professional Disk Operating System', abbreviated 'ProDOS', and was first part of the Apple III's 'Sophisticated Operating System' (SOS, for an unfortunate acronym related to the general state of the Apple III). ProDOS was designed to be a replacement for DOS 3.3, and added many features not part of original DOS 3.3 such as support for disks other than the 5.25" drive, as well as directories and timestamping of files. A number of people have continued to use DOS 3.3 for various reasons, though ProDOS and various GS versions of it (ProDOS 16 and GS/OS) have become much more popular among Apple IIGS owners, as well as HD users. 2.2 Features of DOS 3.x DOS 3.x as released from Apple supports only the 113.75 and 140K 5.25" disk formats. It supports up to 105 files per side, no directory support, with very loose rules on filenames. It was initially bundled with Apple's disk ][ drives, so it won a lot of support for being free and usable. Since 1980, DOS 3.3's 140K per 5.25" side has become the reigning standard for the DOS 3.x versions. DOS 3.x 'System Master' disks could boot and run on any machine with at least 16K of memory (though 24-32K was rather recommended) It did have a number of unsuccessful patches to fix a problem with the APPEND command not properly finding the end of a file before beginning to write; I know of no 100% fixes for that bug. Due to some double-buffering while reading and decoding files off disks, DOS 3.x was not as fast as it could be. A few companies sold modified versions of DOS 3.3 to avoid the extra copy and thus dramatically speed up disk access; Beagle Bros's ProntoDOS and many others were widespread. DOS 3.3 could also be modified to do other things, such as use a few more tracks on disk for extra space, relocate itself into the top 16K of memory on a 64K machine, but again, these were all third party patches, nothing official from Apple. Some of these patches and features came at the expense of the INIT command. 2.3 Features of ProDOS ProDOS allowed directories to be created and files stored in them, time/date stamping of files, and support for disks other than the original Disk ][ drive-- up to 32MB per disk volume (partition). It did go with far more restrictive filenames (possibly as an attempt to move 'towards' MS-DOS), and case insensitive filenames at the cost of everything appearing in uppercase. Apart from the very earliest versions, ProDOS has required a 64K Apple II. When the Apple IIGS came out, the need for a 16-bit OS was apparent, so with a quick wrapper around ProDOS, 'ProDOS 16' was created, turning the existing ProDOS to 'ProDOS 8'. Versions 2.x of ProDOS 8 require an enhanced //e, //c, IIc+ or GS. ProDOS incorporates most to all of the disk read speedups provided by DOS 3.3 third party enhancements, so it does not need to be patched to sped up. ProDOS also has the ability to not reside on a disk when first formatted (at obvious disk space savings), but be copied on later and the disk will be bootable if copied correctly to the root directory as well as an application to run at boot. Similar functionality could be gained in DOS 3.x by using certain utility programs, but is not standard. ProDOS's 'BASIC.SYSTEM' commandline functionality gained a few features over DOS 3.3, such as support for typing commands in lowercase. A few lesser-used commands were removed, most notably the ability to switch to 'Integer Basic', as well as disk formatting. _________________________________________________________________ Section 3: Commands quick reference A listing of all commands, one per line, to facilitate finding the appropriate commands. Only the required part of each command is shown here; optional parts are detailed in the sections on DOS 3.x optional params and ProDOS optional params. Commands common to both DOS 3.x and ProDOS: CATALOG Shows a directory listing. [ProDOS: see also cat] LOAD filename Loads a Applesoft BASIC program. SAVE filename Saves a Applesoft BASIC program. RUN filename Loads and runs a Applesoft BASIC program. BLOAD filename Loads a binary file. BSAVE filename,Aaddr,Llen Saves a binary file. BRUN filename Loads and executes a binary file OPEN filename Opens a text file. For BASIC programs only. CLOSE [filename] Closes specified (or all) open text files. READ filename Reads from a text file. For BASIC programs only. WRITE filename Writes to a text file. For BASIC programs only. APPEND filename Appends to a text file. For BASIC programs only. POSITION filename Sets position in text file. For BASIC programs only . EXEC filename 'Executes' a text file, as if every line was typed. DELETE filename Attempts to remove a file from disk LOCK filenname Quick file protect from change or deletion UNLOCK filenname Undoes a LOCK RENAME file1,file2 Renames 'file1' to 'file2' IN#slotnum Redirects input from the specified slot PR#slotnum Redirects output to the specified slot VERIFY filename Checks existence, DOS 3.3 checks if is readable DOS 3.x only commands: INIT filename Formats disk, current BASIC program saved as boot app. MON [,C][,I][,O] Traces DOS 3.3 commands NOMON [,C][,I][,O] Cancels tracing of DOS 3.3 commands MAXFILES n Reserves buffers for disk i/o FP Switches to Applesoft BASIC, erases program in memory INT Switches to Integer BASIC, erases program in memory ProDOS's BASIC.SYSTEM only commands: CAT 40-column directory listing. PREFIX [dirname] Displays current directory or changes current dir. CREATE filename Creates a file with optional type - filename Executes Applesoft, binary, text, system file BYE Exits to ProDOS application switcher FLUSH Writes all buffers to disk CHAIN filename Runs another Applesoft program, variables intact FRE Faster Applesoft string garbage collection STORE filename Writes Applesoft variables to a file RESTORE filename Reads Applesoft variables from a file MTR Jumps to monitor (same as 'CALL -151') _________________________________________________________________ Section 4: In depth explanation of commands, optional params 4.1: DOS 3.x file names and types DOS 3.x filenames can from 1-30 characters in length, and must start with an uppercase letter. They cannot contain commas, colons, but can contain control characters. (Return (control-M) is a pain to type, and thus usually out). DOS 3.x has essentially 8 filetypes, noted by the character in the directory listing: Applesoft Basic (A), Integer Basic (I), Text file (T), Binary (B), 'S' (source? -- rarely used) type files, and 'R' (relocatable-- also rarely used) files, plus a second 'A' and 'B'. A sample directory listing from a CATALOG is shown below: DISK VOLUME 254