Commodore DOS - DOS Commands

DOS Commands

Command Description BASIC 1.x and 2.x Implementation DOS Wedge Implementation BASIC 3.0+ Implementation
New
Format a disk, preparing it for use and deleting any data contained on it. Omitting the two-character identifier parameter will perform a quick deletion of all files on an already-formatted disk.
OPEN 15,8,15,"N0:disk name,identifier":CLOSE 15 @N0:disk name,identifier HEADER "disk name",Iidentifier
Scratch
Delete a file from the disk (or multiple files, using wild card matching)
OPEN 15,8,15,"S0:file name":CLOSE 15 @S0:file name SCRATCH "file name"
Rename
Rename a file on the disk. Note that the new name comes first (except in the BASIC 3.0+ code)!
OPEN 15,8,15,"R0:new name=old name":CLOSE 15 @R0:new name=old name RENAME "old name" TO "new name"
Initialize
Reset the drive and read the disk BAM into its internal memory. Rarely needed as the drive usually does this on its own, except if a disk is exchanged for another one with the same ID.
OPEN 15,8,15,"I0:":CLOSE 15 @I0: DCLEAR (BASIC 7.0+ only)
Validate
Reconcile the BAM with the disk directory, allocate all used blocks and free all blocks not being used by files, and delete all unclosed files from the directory. Comparable to CHKDSK/ScanDisk tools of Microsoft operating systems.
OPEN 15,8,15,"V0:":CLOSE 15 @V0: COLLECT
Copy
Duplicate a file on the same disk (or another disk in the same two-drive unit) under a different file name. Note that the new name comes first (except in the BASIC 3.0+ code)! Duplicating to another disk without a two-drive unit requires using a utility program.
OPEN 15,8,15,"C0:new name=0:existing name":CLOSE 15 @C0:new name=0:existing name COPY"existing name"TO"new name"
Duplicate
Duplicate an entire disk. Only available in two-drive units, otherwise a utility program needs to be used instead. The target(!) drive number comes first, then the source drive number (except in the BASIC 3.0+ code).
OPEN 15,8,15,"D1=0":CLOSE 15 @D1=0 BACKUP D0 TO D1

There are also a command for seeking in RELative type files (RECORD#), several block-level direct-access commands (BLOCK-READ, BLOCK-WRITE, BUFFER-POINTER), block management (BLOCK-ALLOCATE, BLOCK-FREE), drive memory manipulation and execution of program code on the drive's processor (MEMORY-WRITE, MEMORY-READ, MEMORY-EXECUTE, BLOCK-EXECUTE) and user-definable functions (USER and & commands). Some of the theoretically user-definable functions were rededicated for accessing new functionality in DOS versions after 1.0.

Read more about this topic:  Commodore DOS

Famous quotes containing the words dos and/or commands:

    If I were sufficiently romantic I suppose I’d have killed myself long ago just to make people talk about me. I haven’t even got the conviction to make a successful drunkard.
    —John Dos Passos (1896–1970)

    If writers were too wise, perhaps no books would get written at all. It might be better to ask yourself “Why?” afterwards than before. Anyway, the force from somewhere in Space which commands you to write in the first place, gives you no choice. You take up the pen when you are told, and write what is commanded. There is no agony like bearing an untold story inside you.
    Zora Neale Hurston (1891–1960)