To those people familiar with the MS-DOS command prompt, have you ever wondered how similar tasks are accomplished with non-PC compatible systems? Well, I am one of those people and I have wondered, so I have written this blog article to compare common disk operations with the DOS for the IBM PC, the Apple II and the Commodore 64 (and VIC-20) to compare how these tasks might or might not be accomplished on each system.
Three Approaches to a Disk Operating System
IBM PC & Compatibles
The IBM PC usually came with one or two floppy drives installed in the system. These drives plugged into a floppy controller expansion card which would be inserted into one of the PC's expansion slots. The IBM Diskette Drive Controller card supported two internal and two external disk drives, but it was rare for more than two disk drives to be supported in a system.
The IBM PC Model 5150 had BASIC in ROM like most other home computers of the time but also had the ability in its BIOS to boot from floppy disk and routines to read and write to it. The BIOS would execute code on the first sector of the first floppy disk, and if none were found it would drop the user into Cassette BASIC.
PC-DOS would be booted by putting the DOS disk in the drive and turning on the system. When the system finished booting you were left at a command prompt (asking you for the date and time if booting from an unmodified original DOS disk). Thereafter you could run disk commands, enter BASIC by running a program that added extensions to the BASIC in ROM, or run other programs, including those off a second drive. When PC-compatible clones entered the market they typically removed the BASIC in ROM and would do nothing unless a bootable disk was in the first drive. Their versions of MS-DOS would contain the BASIC wholly on the disk. While there are many, many versions of PC-DOS, the main ones we will be focusing on are 1.0, 1.1 & 2.0. Also for this article PC-DOS is equivalent to MS-DOS.
Apple II
Apple II's drives were external boxes which plugged into an expansion card that would be inserted into one of the Apple II's expansion slots inside the system. The Apple II also had BASIC in ROM but its firmware did not know anything about floppy drives. The Apple II's firmware could scan each expansion slot for a ROM which could then take over the system. The Disk II's Interface Card contained a small bootstrap ROM which allowed a disk to load itself into memory. Each Interface Card could support one or two drives.
Apple released versions of its disk operating system for the Apple II from 1978-1983, called DOS, and it came in three major versions, 3.1, 3.2 & 3.3. Apple implemented its DOS in a somewhat slightly different way than IBM would. When Apple DOS is booted it copies its core components from disk into memory. However, Apple DOS presents itself as an extension of the BASIC prompt with disk operation commands being able to be entered alongside BASIC programming commands. By comparison, in PC-DOS the DOS command line is separate from the BASIC programming interface.
Commodore VIC-20 & 64
The Commodore VIC-20, 64 and the early PET machines had BASIC in ROM but had disk drives that were their own external self-contained computing systems, beginning with the dual 2040 floppy drive in 1978. The earlier Commodore machines could not boot disks, instead they had to communicate with the disk drives over a unique serial port (VIC-20, C64) or an IEEE-488-compatible parallel port (PET).
The C64 and VIC-20 could only directly boot either BASIC or a cartridge ROM. Commodore's disk drives provided DOS in their ROM firmware, but this was only accessible to the BASIC in the computer via port access commands. The DOS version contained in Commodore's 1540 and 1541 disk drives is 2.6. Commodore 1540, 1541 and compatible drives are daisy chained when connected to a Commodore serial port. Up to four drives are supported connected in this fashion.
Disk Capacity for 5.25" Non-High Density Disks
PC-DOS 1.0 only recognized single sided 5.25" double density disk drives with 8 tracks per sector. PC-DOS 1.1+ recognizes single or double sided drives and PC-DOS 2.0+ added support for 9 sectors per track.
PC-DOS 1.0 : 40 tracks x 8 sectors per track x 512 bytes per sector = 163,840 bytes per disk side
PC-DOS 1.1 : 40 tracks x 8 sectors per track x 512 bytes per sector x 1 or 2 sides = 163,840 bytes per disk side or 327,680 bytes per disk
PC-DOS 2.0 : 40 tracks x 8 or 9 sectors per track x 512 bytes per sector x 1 or 2 sides = 163,840 or 184,320 per disk side or 327,680 or 368,640 bytes per disk.
Apple DOS and ProDOS only recognize single-sided 5.25" disk drives although ProDOS can recognize other disk types. Apple DOS originally only worked with 13 sectors per track but Apple DOS 3.3 increased this limit to 16 sectors per track.
Apple DOS 3.1-3.2 : 35 tracks x 13 sectors per track x 256 bytes per sector = 116,480 bytes per disk side
Apple DOS 3.3 & ProDOS : 35 tracks x 16 sectors per track x 256 bytes per sector = 143,360 bytes per disk side
Commodore DOS 2.6 only recognizes single sided 5.25" disk drives, later Commodore DOSs, which accompany more advanced drives, can recognize other formats. The Commodore format can pack more sectors into the wider outer tracks through zone bit recording to improve disk storage space.
Commodore DOS 2.6 : ((17 tracks x 21 sectors) + (7 tracks x 18 sectors) + (6 tracks x 18 sectors) + (5 tracks x 17 sectors)) x 256 bytes per sector = 174,848 bytes per disk side
Even though Apple and Commodore write their disks at single density bit rates, their use of Group Code Recording gives their disks double density capacities
File name, Number of Files and Directory Limits per Disk
PC-DOS 1.0-1.1 : 8 characters plus 3 character extension (8.3), 64 files per disk (single sided), 112 files per disk (double sided)
PC-DOS 2.0 : 8 characters plus 3 character extension (8.3), 64 (single sided disks) or 112 (double sided disks) files or subdirectories for the root disk directory + subdirectories with a full path of 63 characters or less
Apple DOS 3.1-3.2 : 84 files per disk, 30 characters per file name
Apple DOS 3.3 : 105 files per disk, 30 characters per file name
Apple ProDOS : 51 files or subdirectories for the root disk directory, 15 characters per file name + subdirectories with a full path of 64 characters or less
Commodore DOS 2.6 : 144 files per disk, 16 characters for file names
Disk Volumes Label Character Limit
PC-DOS 2.0 : 11 characters
Apple DOS 3.1-3.3 : Number from 1-254
Apple ProDOS : 15 characters
Commodore DOS 2.6 : 16 characters
File Types
PC-DOS does not really have file types, everything is just a binary to the kernel. Apple DOS and Commodore DOS define several file types because they were designed to work with BASIC.
Apple DOS
Apple DOS defines eight types of files, but only five of them were defined:
I = Integer BASIC Program
A = Applesoft BASIC Program
B = Binary File
T = Text File
R = Relocatable Binary File
ProDOS
Apple's ProDOS recognizes many file types with a three character designation. Popular types include
BAS = Applesoft BASIC program
SYS = ProDOS System File
DIR - Directory File
BIN = Binary File
TXT = ASCII Text File
Commodore DOS
PRG = Program File
SEQ = Sequential Data File
REL = Relative Data File
USR = User File (almost identical to SEQ)
DEL = Deleted File
Both Apple DOS and Commodore DOS support both sequential and relative data files but Apple DOS identifies them both as text files. Sequential files are linear files, relative files are random access.
Typical User Disk Commands
When considering the limitations of a disk operating system, one must consider what the average user (not a developer) expects to do with the disk operating system. The most important disk management tasks in my opinion include formatting a disk for use with the system, copying, deleting and renaming files, copying disks, making a disk bootable, checking a disk for errors, changing the disk volume label or number and protecting files and working with subdirectories if supported by the operating system.
Format a Disk
IBM PC-DOS : FORMAT [drive letter]
Apple DOS 3.1-3.3 : INIT [filename]
Apple ProDOS : Use format utility in Filer or System Utilities
Commodore DOS 2.6 : OPEN 15,8,15,”N:DISKNAME,ID”:CLOSE 15 (New)
To format a disk on the PC, you use the FORMAT command. The FORMAT command is an external command or program, so it must be in the active directory where you wish to use the command (or a directory identified in the PATH in AUTOEXEC.BAT.)
Apple DOS requires you to use the INIT command, and this command requires a file to be created on the newly formatted disk. Usually the file is called "HELLO" but can be called anything. You can add text to this file so that it displays a message whenever the disk is booted, which is helpful because Apple DOS only has volume numbers, not labels. The file is a BASIC program, so you can add commands that will be automatically run on boot like an AUTOEXEC.BAT file.
Apple DOS will commit to formatting a disk instantly once you press Return after typing something like INIT HELLO at the BASIC prompt, unlike PC-DOS it does not give you any "are you sure" prompts. Make sure to write protect your original and important disks. This is especially important if you are limited to a single drive system but you can still screw up a disk if you forget to use ,D2 if you want to format a disk in Drive 2.
Apple ProDOS does not have a format command you can type onto a BASIC prompt, instead it has a suite of utilities which can handle most common disk tasks. In this suite, contained in a program called Filer (early ProDOS versions) or System Utilities (all official ProDOS versions), you can format a disk. This will make the disk readable and usable by ProDOS but not by Apple DOS. Early versions of ProDOS will allow you to format a disk as a DOS 3.3 disk (but it will not be bootable), which was important during the early days of ProDOS when most software still expected DOS 3.3.
After formatting on the respective DOS 129,976 bytes would be free for a formatted Apple DOS 3.3 disk (subtract at least 512 bytes if bootable) and 139,776 bytes free for a formatted (non-bootable) Apple ProDOS disk.
Commodore BASIC cannot understand DOS commands on its own, all it can do is send information to an external device. Almost all DOS commands therefore begin with OPEN 15,8,15,. The BASIC OPEN command opens a communications channel and once the command is finished processing, the CLOSE 15 closes the communications channel. The numbers after the OPEN have meaning:
15 = Logical File Number
8 = Device Number
15 = Secondary Address
In Commodore BASIC most physical input and output devices can be treated like software files and referenced by a logical file number. The C64 can recognize file numbers from 1-127 and the C64 allows for up to 10 files to be worked on at a time. The logical file number is the least important number of the three because for a simple disk operation command, it can be any number from 1-127.
The device number is the most important number of the three. This identifies the physical input or output device to which data will be read or written. 1541 disk drives start at device # 8 with the first drive, device # 9 with the second drive and so on.
The secondary address is device specific and has importance for disk operations. The 15 tells the device, in this case the disk drive, that when used with OPEN a command is being sent and that the string to be sent is a command to DOS as opposed to data to be written or read. Similarly, CLOSE closes the command channel so the drive will not accept any further commands until another OPEN statement is entered. With the format command you can optionally give the disk a volume name and a two byte identifier number. All DOS commands and file designations in Commodore BASIC must have "" around them.
If you want to run multiple DOS commands, you do not need to bookend every DOS command with an OPEN and CLOSE command. The first command must be preceded by an OPEN statement and when you are done, your last command must have a CLOSE statement. Commands in between these two need only a PRINT# 15, statement before the command.
The need to type in the OPEN and CLOSE commands for DOS commands was deemed even by Commodore to be a bit cumbersome, so they provided a Test/Demo Diskette which had a special program on it called a DOS Wedge, which truncated the LOAD, OPEN and CLOSE commands to a /. Showing a directory list was as simple as @$ or >$. While the wedge was fast to load by 1541 standards, DOS wedges found on cartridges like the Epyx Fast Load were instantaneous. This diskette came with wedges for both the C64 and the VIC-20.
A DOS formatted 1541 disk has 169,984 byte free. Because Commodore DOS is stored in the disk drive and Apple DOS is stored on the disk itself, this allows Commodore DOS to present a significantly less disk overhead compared to Apple DOS.
List the Contents of a Disk or Directory
PC-DOS : DIR
Apple DOS 3.1-3.3 : CATALOG
Apple ProDOS : CAT or CATALOG [/Directory]
Commodore DOS 2.6 : LOAD"$",8 - LIST
Apple DOS 3.1-3.3 : CATALOG
Apple ProDOS : CAT or CATALOG [/Directory]
Commodore DOS 2.6 : LOAD"$",8 - LIST
With PC-DOS, all you need to do to list the contents of a directory is enter the DIR command. The DIR command has several command line arguments, such as /W for a list that shows the filenames in three columns instead of one (only properly formatted for an 80-column display), /B if you do not want to see anything other than names and not calculate free disk space, /P to pause the file listing if it will take up more than one screen and so on. DIR is an internal command, so it can be run from anywhere. The hidden system files do not show up in the DIR display unless you use the /A argument, which was not available until DOS 5.0.
Apple DOS uses the CATALOG command to list files and is available when the system finishes booting DOS. Apple DOS commands do not have command line arguments that modify how the program works except to specify the slot, drive and volume number of a disk.
Apple ProDOS has CAT and CATALOG. CATALOG shows more information than CAT but its listing is formatted for an 80-column display. Use CAT when running in 40-column mode. ProDOS will show the date modified and (CATALOG) date created file dates. CAT and CATALOG will automatically pause when the end of the screen is reached, prompting you to press a key to continue displaying the file list.
Commodore DOS uses an unusual approach to list the contents of a disk, even by Commodore standards. Instead of OPENing a channel on the device, all you need to do is to load a special BASIC program written by every Commodore DOS-formatted disk. This file is symbolized by the $ character, and the 8 which follows it is the device number. Then once the file is loaded into BASIC, you enter the LIST program to view its contents like any other BASIC program. If the disk has many files you can slow each line's display on the screen by holding down the Ctrl key or stopping the LIST at a particular point by pressing the RUN/STOP key. LOADing and LISTing a disk's file list in this way will destroy any active BASIC program in memory.
Copy a File
PC-DOS : COPY [filename] [location]
Apple DOS 3.1-3.3 : LOAD - SAVE [new filename] or run Apple II File Developer utility (3.3)
Apple ProDOS : Copy Utility in Filer or System Utilities
Commodore DOS 2.6 : OPEN 15,8,15,"C:new name=existing name":CLOSE 15
Apple DOS 3.1-3.3 : LOAD - SAVE [new filename] or run Apple II File Developer utility (3.3)
Apple ProDOS : Copy Utility in Filer or System Utilities
Commodore DOS 2.6 : OPEN 15,8,15,"C:new name=existing name":CLOSE 15
PC-DOS makes copying a file as easy as a command as COPY A:SAMPLE.TXT B:. This copies the file SAMPLE.TXT from drive A: to drive B:. Even if you only had a single disk drive, B: can be used as sort of a logical drive placeholder and DOS will prompt you so you can change disks before completing the copy operation. If you wanted to back up a copy of SAMPLE.TXT to your active disk, the command would be copy SAMPLE.TXT SAMPLE1.TXT.
Apple DOS does not have a way to copy files as simply. It recognizes three major file types, Integer BASIC files, Applesoft BASIC files and Binary files. In order to copy a file, first your LOAD (BASIC) / BLOAD (Binary) the file and then SAVE / BSAVE the file. If you want to make a backup of the file with a new name, then you can enter a new filename when you save the file. If you want to copy the file to another disk, then you can either use the ,D2 parameter (if you have two disk drives) or change the disks (single disk drive) before you hit Return on the SAVE command.
The LOAD/BLOAD - SAVE/BSAVE routine but that works only for BASIC and Binary files. There are other file types which are recognized by DOS like Text files but those cannot be copied on a file by file basis at the DOS command line. Fortunately Apple included a program on the DOS 3.3 System Master called FID, "Apple II File Developer." This program will allow you to copy a single file of any type from one disk to another or to backup a file with a new name. Apple ProDOS also has a copy utility for copying any kind of file. Both of these utilities work to copy a file from one disk to another even if you only have a single disk drive.
Commodore acts similarly to PC-DOS for making backups of single files but copying files from one drive to another is more difficult with multiple 1541 drives than dual disk drives like the 2040 and 4040. The copy command which can perform this function on the dual drives will not work with 1541 drives because the device number for the 2nd drive is different from the 1st. At some point the Test/Demo disk which came with the 1541 drive included a program called COPY/ALL and then UNI-COPY which could copy files from two disk drives on different device numbers. If you have a single disk drive this method will not work, so instead you will have to use the LOAD and SAVE method described above for the Apple II.
Delete a File
PC-DOS : DEL (ERASE) [filename]
Apple DOS 3.1-3.3 : DELETE [filename]
Apple ProDOS : DELETE [filename]
Commodore DOS 2.6 : OPEN 15,8,15,"S:file name":CLOSE 15 (Scratch)
Apple DOS 3.1-3.3 : DELETE [filename]
Apple ProDOS : DELETE [filename]
Commodore DOS 2.6 : OPEN 15,8,15,"S:file name":CLOSE 15 (Scratch)
The original PC-DOS command for deleting a file is called ERASE, but DEL was the shortcut available from the start and everyone used that. ERASE should still be recognized even as to the last versions of PC-DOS and MS-DOS. Wildcards in filenames can be helpful when you wish to act on several files at one.
There are two wildcards that PC-DOS recognizes, single character wildcards use ? and multiple character wildcards use *.
The * character before the extension will delete all files with that extension and the * character after the extension will delete all files with the name. Using *.* will delete all files in a directory. $ is similar to * except that it only applies to a single character as opposed to up to 8 or 3 that * provides. It does provide for flexibility because the ? wildcard can be anywhere in the name. You can also use multiple $ wildcard. For example:
DEL *.COM deletes all .com files in a directory.
DEL AUTOEXEC.* deletes all files beginning with autoexec regardless of their file extension.
DEL OBJ$.BIN will delete files named OBJ0.BIN-OBJ9.BIN(and OBJA.BIN, OBJB.BIN and so forth)
Apple DOS supports = as a wildcard character in a command requires you to type in a file name, but only in the Apple II File Developer program. It gives you the option for a yes or no prompt for each file operation. It acts like *. Apple ProDOS' utilities also recognize the = character but also use ? character to prompt you for each change you wish to make.
Commodore DOS can delete one file or multiple files as it uses the same characters for wildcards and in the same way as PC-DOS in this instance. If you wish to delete the files off an entire disk, use the format command but omit the two byte identifier. That will wipe the disk without needing to spend extra time reformatting it. The 1541 Test/Demo disk had several utility programs on it, including an UNSCRATCH utility which could restore deleted files provided the disk had not been written to in the meantime. PC-DOS did not have an UNDELETE utility until DOS 5.0.
Rename a File
PC-DOS : REN (RENAME) [current filename] [new filename]
Apple DOS 3.1-3.3 : RENAME [current filename], [new filename]
Apple ProDOS : RENAME [current filename], [new filename]
Commodore DOS 2.6 : OPEN 15,8,15,"R:new name=old name":CLOSE 15 (Rename)
Apple DOS 3.1-3.3 : RENAME [current filename], [new filename]
Apple ProDOS : RENAME [current filename], [new filename]
Commodore DOS 2.6 : OPEN 15,8,15,"R:new name=old name":CLOSE 15 (Rename)
Rename acts similarly to delete and can be used with wildcards in certain ways.
Copy a Disk
Copy a Disk
PC-DOS : DISKCOPY [source drive] [destination drive]
Apple DOS 3.1-3.3 : COPY or COPYA
Apple ProDOS : Use disk copy utility in Filer or System Utilities
Commodore DOS 2.6 : OPEN 15,8,15,"D1=0":CLOSE 15 (Duplicate)
Commodore DOS 2.6 : OPEN 15,8,15,"D1=0":CLOSE 15 (Duplicate)
PC-DOS has a command called DISKCOPY to copy one disk to another disk, but if you only have a single disk drive system you will be swapping disks several times depending on the size of the disk.
Apple DOS contains a program to copy disks. On Apple DOS 3.3 the COPY program is used with Integer BASIC and the COPYA program is used with Applesoft BASIC. Apple DOS 3.2 came with separate disks for Integer BASIC and Applesoft BASIC and the programs were identically named COPY, Apple DOS 3.1 only supported Integer BASIC. It will ask for the source slot and drive, the destination slot and drive and then start copying without further prompting. Apple ProDOS has a similar utility.
In an Apple II or II+, a disk controller card can reside in any slot between 1-7 (an Apple IIe cannot put a disk in slot 3 due to conflicts with 80-column firmware) but the de-facto standard is slot 6. Each disk controller card can control two drives. You can have multiple disk controller cards in a system. A single drive system will require several swaps to copy over a disk. To copy a disk from drive 1 to drive 2, you will tell the COPYA program that the source disk is in slot 6, drive 1 and the destination disk is in slot 6, drive 2.
Commodore DOS requires a two drive system to copy one disk to another. Commodore 1541 drives and its compatible successors also came as separate units and can be assigned as device 8, 9, 10 or 11 using dipswitches or jumpers in the drive. The 1541 Test/Demo Disk had a utility program called SD.BACKUP which allowed you to duplicate a disk with only one drive and several disk swaps.
Print a Plain Text File
PC-DOS : TYPE [filename]
Apple DOS 3.1-3.3 : Write a BASIC Program or use a third-party utility
Apple ProDOS : Write a BASIC Program or use a third-party utility
Commodore DOS 2.6 : Write a BASIC Program or use a third-party utility
Apple DOS 3.1-3.3 : Write a BASIC Program or use a third-party utility
Apple ProDOS : Write a BASIC Program or use a third-party utility
Commodore DOS 2.6 : Write a BASIC Program or use a third-party utility
PC-DOS is the only easy DOS described here which makes it easy to display a plain text file. TYPE myfile.txt will make the contents of that file display instantly on the screen. TYPE is not smart enough to pause the output if the file is too large to be displayed on one screen, so you use TYPE myfile.txt | MORE to insert pauses every 24 rows.
Apple DOS and ProDOS know that there is a file type called Text for plain text files but have no commands or utilities to read a plain text file. You are required to write a BASIC program to print out a plain text file to a screen or a printer. It is better to use a third party program to read these files, but they are not common with commercial software disks. Commodore DOS does not recognize a plain text file specifically, so the third party utility is required for its systems as well.
Make a Disk Bootable
PC-DOS: FORMAT [drive letter] /S or SYS [drive letter]
Apple DOS 3.3: INIT [filename]
Apple ProDOS: Format then copy PRODOS and BASIC.SYSTEM
Commodore DOS 2.6: Not applicable
Apple ProDOS: Format then copy PRODOS and BASIC.SYSTEM
Commodore DOS 2.6: Not applicable
If you wish to make a PC-DOS disk bootable, you put a /S as a command line parameter as you run the FORMAT program and the program will copy the DOS kernel files (IBMIO.COM / IO.SYS & IBMDOS.COM / MSDOS.SYS) over to the disk to their correct places. Depending on the version of PC-DOS, you may have to copy COMMAND.COM, the command line interpreter, over separately (or use a different command line interpreter). You can also use the SYS command after formatting a disk but the disk must be empty or have placeholder files for the two kernel files because a bootable disk must have the DOS system files written to the disk into specific areas.
Making a disk bootable will reduce the amount of free space available to the user, the amount taken depends on the version of DOS. From the disk capacities given above you can expect to subtract about 12KiB from a PC-DOS 1.0 disk, 13KiB for a PC-DOS 1.1 disk and 40KiB from a PC-DOS 2.0 disk.
The INIT command in Apple DOS also copies over DOS kernel, making the disk bootable.
The Apple ProDOS format utility will not make the disk bootable. To do that you must copy over the BASIC.SYSTEM and PRODOS files from a master ProDOS disk. A third party program can make a disk bootable without manually copying over these files.
As mentioned previously, you cannot boot to a floppy on a Commodore VIC-20, C64 or most other Commodore 8-bit computers, you must run a command as described in the next section.
Run a Program
PC-DOS: [filename].EXE, [filename].COM or [filename].BAT
Apple DOS 3.1-3.3 : RUN or BRUN [filename]
Apple ProDOS : RUN or BRUN [filename]
Commodore DOS 2.6 : LOAD "[program name]",8[,1] - RUN
Apple DOS 3.1-3.3 : RUN or BRUN [filename]
Apple ProDOS : RUN or BRUN [filename]
Commodore DOS 2.6 : LOAD "[program name]",8[,1] - RUN
PC-DOS can execute three file types by directly typing them from the command prompt. They are .COM files (which can fit into a 64KiB memory segment), a .EXE file (which can utilize more than 64KiB of memory) and .BAT files, which are batch files which can automate running DOS commands.
Apple DOS and ProDOS can RUN a BASIC program (Integer BASIC is only supported on Apple DOS) or BRUN a Binary program. Most Apple and some IBM PC program disks are self bootable and only require to be inserted into Drive 1 or A: and the machine turned on, then they will automatically boot without further prompting. Most Apple self-booting disks can also be booted by using the PR#6 command.
A Ctrl + Open Apple + Reset should allow any disk program to reboot (Apple IIe or later). A similar key combination exists in the IBM PC world, Ctrl + Alt + Del, but this only triggers a software interrupt reset and programs can ignore it.
Commodore disk programs often, but not always, can use the famous LOAD"*",8,1 command to load. These files use the PRG file type. The "*" character refers to the first file on the disk, the ,8 is the device number and the ,1 is required for binary files. Leave the ,1 off to load a BASIC program and type RUN after finishing the initial load to continue the boot process. Some programs (Ultima III & IV) have the player load a BASIC program, not a binary program and then enter RUN. Not all programs (Ultima II) have their boot program as their first file, so refer to the program's instructions if the usual command does not work.
Change the Active Disk
PC-DOS : A: to Z:
Apple DOS 3.1-3.3 : [command], [D1 or D2]
Apple ProDOS : [command], [pathname] [S1-7], D1 [or D2]
Commodore DOS 2.6 : Change "8" to "9" in command
Apple DOS 3.1-3.3 : [command], [D1 or D2]
Apple ProDOS : [command], [pathname] [S1-7], D1 [or D2]
Commodore DOS 2.6 : Change "8" to "9" in command
PC-DOS assigns physical floppy disk drives a drive letter from A-Z. It can also assign logical disk drives and hard drive partitions to letters. A: and B: are always floppy drives, C: is usually the first hard drive and CD-ROM or Zip Drives usually get assigned to D: or the first available drive letter after the hard drives. To change the active drive you only need to type A:, B:, C: etc. and press Enter. That allows you to issue commands to the drive and run programs on the drive. The prompt will display the active drive.
The Apple command line is just the BASIC prompt and only shows a ] or a > character. In order to change the active drive from Drive 1 to Drive 2, you insert a ,D2 at the end of a command. Thereafter all disk operations will act on Drive 2 until you switch back to Drive 1 with ,D1. If you wish to use a secondary disk controller, then you must specify the slot number (, S5 for example) where the secondary disk controller can be found. Normally you do not need to type in the slot number.
To access a second, third or forth drive in a Commodore system, change the device number from 8 to the number assigned to the second drive, usually 9, in the command you type in.
Set or Change the Date and Time
PC-DOS : DATE or TIME
Apple DOS 3.1-3.3 : Third Party DOS Patchers
Apple ProDOS : Set Date & Time utility in Filer or System Utilities
Commodore DOS 2.6 : Not Applicable
Apple DOS 3.1-3.3 : Third Party DOS Patchers
Apple ProDOS : Set Date & Time utility in Filer or System Utilities
Commodore DOS 2.6 : Not Applicable
PC-DOS supported date and timestamps for files and has a clock running in the background thanks to the timer chip in the IBM PCs. If a PC-DOS disk is booted without an AUTOEXEC.BAT file the system will ask the user to set the date and time. In fact PC-DOS 1.0 will force you to enter a date and time, but later versions will allow you to press Enter twice to get past the prompts. PC-DOS 3.0 supports the real time clock chip found in the IBM PC AT and compatibles but earlier PCs need to load a driver or program which retrieves the date and time as stored in a real time clock and report it to DOS.
Apple ProDOS does not prompt for a date and time but will let you set it in its utility program. It supports file date and timestamps for when the file was created and when it was modified. It also supports the Thunderclock Plus real time clock and devices which emulate it. The Thunderclock predates ProDOS but DOS 3.3 had to be patched to add third party support for date and time stamps.
Commodore BASIC can keep time through the timer chips, but a third party device and software is required to remember the time after the system is shut down. The graphical operating system GEOS supports C64 RTCs.
Change the Active Directory
PC-DOS : CD (CHDIR) [subdirectory]
Apple DOS 3.1-3.3 : Not Applicable
Apple ProDOS : PREFIX [subdirectory]
Commodore DOS 2.6 : Not Applicable
Apple DOS 3.1-3.3 : Not Applicable
Apple ProDOS : PREFIX [subdirectory]
Commodore DOS 2.6 : Not Applicable
PC-DOS 2.0 introduced the concept of subdirectories into the IBM PC compatible world. In order to change to a subdirectory, one uses the CD command. To move back up one level of subdirectory, one can type the CD .. command. You can move to any subdirectory from any subdirectory on the drive if you type in the full path of the subdirectory, separated with a \ character. The DOS prompt will not show the active subdirectory unless you enter PROMPT $p (and also preferably $g) in either AUTOEXEC.BAT or at the DOS prompt.
Apple ProDOS has a similar command called PREFIX and it works similarly. Subdirectories are separated with a / character. To go up a level use PREFIX / and to go any subdirectory to another subdirectory, type in the full path.
Make a New Subdirectory
PC-DOS : MD (MKDIR) [subdirectory]
Apple DOS 3.1-3.3 : Not Applicable
Apple ProDO S: CREATE [subdirectory]
Commodore DOS 2.6 : Not Applicable
Apple DOS 3.1-3.3 : Not Applicable
Apple ProDO S: CREATE [subdirectory]
Commodore DOS 2.6 : Not Applicable
Making a directory is easy enough in PC-DOS and Apple ProDOS with the MD and CREATE commands. A directory can have a 3 character extension like a file can in PC-DOS, but this is not often used. The levels of subdirectories you can nest is limited in practical terms by the path length limit.
Remove a Subdirectory
PC-DOS : RD (RMDIR) [subdirectory]
Apple DOS 3.1-3.3 : Not Applicable
Apple ProDOS : Third Party Program
Commodore DOS 2.6 : Not Applicable
Apple DOS 3.1-3.3 : Not Applicable
Apple ProDOS : Third Party Program
Commodore DOS 2.6 : Not Applicable
PC-DOS can remove an empty directory using the RD command and eventually received the ability in DOS 6.0 to remove a whole subdirectory branch using DELTREE, empty or otherwise. Apple ProDOS does not have a command to remove a directory or a function in Apple Utilities to remove a subdirectory.
Partition a Hard Drive
PC-DOS: FDISK (2.0+)
Apple DOS 3.1-3.3 : Third Party DOS Patches
Apple ProDOS : Use the Filer or System Utilities program
Commodore DOS 2.6 : IEEE-488 Adapter or Third Party Solution
Apple DOS 3.1-3.3 : Third Party DOS Patches
Apple ProDOS : Use the Filer or System Utilities program
Commodore DOS 2.6 : IEEE-488 Adapter or Third Party Solution
PC-DOS 2.0 was the first version of DOS to provide support for hard drives and was included with the IBM PC/XT along with a 10 MiB hard drive. The hard drive connected to a special hard drive controller which added a BIOS extension ROM so that the system could boot and operate the hard drive. The BIOS in the IBM PC and XT does not know anything about hard drives but the BIOS in the IBM PC AT and its compatibles have BIOS routines built into their mainboard BIOSes to manage hard drives.
A new program called FDISK defines a DOS partition in the drive's Master Boot Record and then a FORMAT command must be run on the drive for DOS to make use of it. The drive could be made bootable with the SYS command. Initially PC-DOS only supported a single DOS partition and only 16 MiB ()FAT12). PC-DOS 3.0 added a new partition type with a size up to 32 MiB (FAT16) and then extended partition with up to 23 logical drives (D:-Z:) of 32MiB each. Eventually by DOS 4.0 the partition could be one primary 2 GiB partition and and a extended DOS partition with three logical drives of the same size were supported.
Apple DOS has no idea what a hard drive is or any drive other than a Disk II drive. Third party patches and hardware could allow DOS 3.3 to access the larger storage space of a hard drive, typically by partitioning the drive into multiple 140KiB disks.
Apple ProDOS has far more flexible disk drive support, including 3.5" single and double sided drives as well as small hard drives. Its support for hard drives is limited to a single 32 MiB volume and a single file size of 16 MiB. Apple's first hard drives were the 5 MiB and later 10 MiB ProFile drives. These could be interfaced with the Apple II with a special controller card. Later the Apple II SCSI cards could allow users a much wider number of options for mass storage.
Commodore's hard disk drives like the 9040 (5 MiB) and 9060 (7.5 MiB) contained their own DOS (3.0) like their floppy drives and appear to be semi-officially supported in the VIC-20 and C64. These drives connected over the IEEE-488 bus but they are really slow for hard drives (1.2 KiB/sec). Their DOS does not support subdirectories and operates fairly similarly to DOS 2.6 found in the 1541, which makes using these drives really cumbersome once the number of files gets high. These hard drives can support far many more files than a 1541 drive. Commodore made a VIC-20 cartridge that provided a IEEE-488 bus interface but third parties had to supply a similar cartridge for the C64. Full third party solutions were the better way to go.
Write-Protect/Unwrite-Protect a File
PC-DOS : ATTRIB [DOS 3.0+]
Apple DOS 3.1-3.3 : LOCK or UNLOCK [filename]
Apple ProDOS : LOCK or UNLOCK [filename]
Commodore DOS 2.6 : Third party program
Apple ProDOS : LOCK or UNLOCK [filename]
Commodore DOS 2.6 : Third party program
PC-DOS had support for certain file attributes, system, hidden were available in DOS 1.0 and archive and read-only were added in 2.0. A file could be set to any of these parameters, but until the ATTRIB command was added in PC-DOS 3.0 a user had to use a third party program to set or clear one of these attributes. Apple DOS and ProDOS can easily set or unset a file to be read only with LOCK or UNLOCK. Commodore DOS can recognize a locked file attribute but there is no command provided to lock or unlock a file.
Check for Errors
PC-DOS: CHKDSK or SCANDISK
Apple DOS 3.1-3.3 : VERIFY [filename]
Apple ProDOS : VERIFY [filename] or Verify Utility in Filer or System Utilities
Apple DOS 3.1-3.3 : VERIFY [filename]
Apple ProDOS : VERIFY [filename] or Verify Utility in Filer or System Utilities
Commodore DOS 2.6 : VERIFY [program name], 8
As floppy drives tend to be a somewhat fragile medium and have analog components to them, checking that files still contain the correct data is important. PC-DOS did this with CHKDSK and later (6.0) SCANDISK. CHKDSK can fix some disk errors.
Apple DOS 3.1-3.3 and Apple ProDOS can VERIFY the integrity of single files at the command prompt. The Apple ProDOS Verify Utility can verify all the files on a disk at once, as can the Apple II File Developer found on DOS 3.3 using a wildcard.
Commodore DOS's VERIFY command will compare the data of a BASIC program in memory versus the one saved to a disk, but that is about the only file verification ability available in Commodore DOS. It does not work all the time because where a BASIC program is loaded may differ from system to system depending on how much memory it has (VIC-20). Commodore DOS has a DOS command called Validate but it functions as a disk defragmenter.
Change Disk Volume Label
PC-DOS : LABEL (DOS 3.3+)
Apple DOS 3.1-3.3 : Third Party Program
Apple ProDOS : Rename Volume Utility in Filer or System Utilities
Commodore DOS 2.6 : Third Party Program
The volume name is specified when a disk is formatted and can be shown when a DIR command is performed on the drive or the command VOL is entered. It cannot be changed in early versions of DOS without reformatting the disk or using a third-party tool. The command LABEL was added by DOS 3.3 to change or delete the volume label. Apple ProDOS has a function in System Utilities to accomplish this task. The 1541 Test/Demo disk can accomplish this with a program called HEADER CHANGE.
Determine Disk Free Space
PC-DOS : DIR or CHKDSK
Apple DOS 3.3 : Apple II File Developer Utility
Apple ProDOS : CAT or CATALOG
Commodore DOS 2.6 : LOAD"$",8 - LIST
In PC-DOS, a DIR command could show you the number of bytes free but the CHKDSK command would show you the maximum capacity of the disk with earlier versions of PC-DOS. Similarly, a CAT or CATALOG command in Apple ProDOS will show you the number of blocks free and used. An Apple 5.25" ProDOS disk has 280 x 512 byte blocks.
Apple DOS 3.1-3.3 's CATALOG command will show you how many sectors each file takes but will not add up the sectors for you. The Apple II File Developer has a utility which could show you how many sectors were free on a disk. An empty formatted DOS 3.3 disk contains 560 x 256 byte sectors (455 sectors for DOS 3.1-3.2).
Using the directory list command in Commodore DOS will show you the number of 256-byte blocks free but not the number of blocks available on the disk. The number of blocks available on a disk before a Commodore DOS format is 683 blocks and afterward is 664 blocks.
Conclusion
While PC-DOS is clearly the victor in terms of its overall features and ability to get things done at the command prompt, it is important to note that it was designed to be a very robust operating system by the standards of its day. It was not held back by the memory limitations or the price points of the 8-bit computer systems and had several years of hindsight to determine what worked for a microcomputer. Apple's DOS and especially ProDOS can get the job done when it comes to basic disk operations. Commodore's DOS had barely been updated since 1978 and it showed in the rudimentary commands included on the 1541 disk drive.
I love this, and it can be a great resource for people new to these particular retro machines.
ReplyDeleteI think the command for formatting a disk on the C64 is incorrect - it has 3 quotes and they're not balanced. I would guess the middle one after the : should be removed:
OPEN 15,8,15,”N:”DISKNAME,ID”:CLOSE 15
should probably be:
OPEN 15,8,15,"N:DISKNAME,ID":CLOSE 15
And when running a program:
LOAD,[program name],8 [1]
probably has the , in the wrong place. I think this should be:
LOAD [program name],8[,1]
Thanks for checking those, I fixed them.
Delete