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:
“The Enormous Room seems to me to be the book that has nearest approached the mood of reckless adventure in which men will reach the white heat of imagination needed to fuse the soggy disjointed complexity of the industrial life about us into seething fluid of creation. There can be no more playing safe.”
—John Dos Passos (18961970)
“They went to him and woke him up, shouting, Master, Master, we are perishing! And he woke up and rebuked the wind and the raging waves; they ceased, and there was a calm. He said to them, Where is your faith? They were afraid and amazed, and said to one another, Who then is this, that he commands even the winds and the water, and they obey him?”
—Bible: New Testament, Luke 8:24-25.