You are on page 1of 2

DOS COMMAND PARAMmRS HOUSEKEEPING COMMANDS

QUICK REFERENCE CARD An error message is given if a DOS command INIT X [,Vv] [,Ss] [,Dd]
quantity is too large or too small. Initializes a blank diskette to form a slave
On this card, DOS commands are grouped into diskette. Assigns greeting program name X
these 5 categories: and volume number v (if specified). SAVEs
ALL FILES the BASIC program currently in memory, under
Housekeeping commands: file name X.
INIT LOAD DELETE VERIFY MAXFILES Parameter As shown Min Max
CATALOG RUN LOCK MON Slot
SAVE RENAME UNLOCK NOMON ,Ss S1 S7
Drive ,Dd D1 D2 CATALOG [, Ss] [,Dd]
Volume Displays volume number and all files on a
Access Commands: ,Vv V0 * V254
diskette, with each file's type and sector
FP INT PRil INil CHAIN * indicates a LOCKed file.
* Using v0 is like omitting the Vv parameter. length.
the diskette's volume number is ignored. •
Sequential Text File Commands: Type Description (How created)
OPEN READ APPEND EXEC Smallest volume number INIT will actually
assign to a diskette is 1. I Integer BASIC program file (SAVE)
CLOSE WRITE POSITION A Applesoft BASIC program file (SAVE)
T Text File (OPEN, then WRITE)
Random-Access Text File Commands: B Binary memory-image file (BSAVE)
WRITE SEQUENTIAL TEXT FILES
OPEN CLOSE READ
Parameter As shown Min Max
Machine-Language File Commands: SAVE X [,Ss] [,Dd] [,Vv]
Byte ,Bb Bill B32767
BLOAD BRUN BSAVE
Relative Field * ,Rp Rill R32767 Stores current BASIC program onto diskette,
under file name X. Overwrites any previous
NOTATION AND SYNTAX * With EXEC, always relative to field Ill. file of same type and name, without warning.

A "parameter" is a capital letter, usually LOAD X [,Ss] [,Dd] [,Vv]


followed by a number (shown here by a RANDOM-ACCESS TEXT FILES
Loads BASIC program file X into memory,
lower-case letter), which gives additional after clearing memory and (if necessary)
Parameter As shown Min Max
information for executing a command. changing to the correct BASIC.
Record Length ,Lj Ll L32767
Multiple parameters may, appear in any
Record Number ,Rr Rill R32767
order, but must be separated from each
other by a comma. A parameter shown in RUN X [,Ss] [,Dd] [,Vv]
square brackets [like this] is optional.
BINARY FILES LOADs BASIC program file X,
then RUNs the program.
A file name (shown here by X) must immedi- Parameter
ately follow its command word. File names As shown Min Max
Starting Address ,Aa AIlI A65535
must begin with a letter; only the first Number of Bytes RENAME X, Y [,Ss] [,Dd] [,Vv]
,Lj L1 A32767
30 characters are used. A comma separates Changes a diskette file's name from X to Y
a file name from a following parameter.
DOS COMMANDS
CTRL-D (type D while holding down CTRL key) DELETE X [,Ss] [,Dd] [,Vv]
is used in PRINT statements to indicate the Command Quantity Erases file X from the diskette.
As shown Min Max
start of a deferred-execution DOS command. PRil slot PR# s PRil1ll PR#7
Integer BASIC example: INil slot INil s IN#1lI INil7
10 D$ = "": REM "CTRL-D" MAXFILES file buffers MAXFILES. n LOCK X [,Ss] [,Dd] [,Vv]
n=1 n=16
20 PRINT D$; "CATALOG" Locks file X against accidental change or
Applesoft BASIC example: deletion. LOCKed file shown in CATALOG by *
Commands use Slot or Drive parameters only
10 D$ = CHR$(4) : REM CTRL-D when changing to a different Slot or Drive.
20 PRINT D$; "CATALOG"
If a command omits the Volume parameter or UNLOCK X [,Ss] [,Dd] [,Vv]
The term "BASIC" alone is used to mean either Unlocks previously LOCKed file X
uses VIlI, the diskette's volume number is
Integer BASIC or Applesoft BASIC. The term to allow change or deletion.
"file" alone means .!!!!I. type of diskette file. ignored. A command that uses the Volume
parameter Vv will not be executed unless
the diskette's volume number is v.
VERIFY x [,Ss] [,Dd] [,Vv]
Checks file X for internal consistency. SEQUENTIAL TEXT FILE COMMANDS RANDOM-ACCESS TEXT FILE
If X was saved without "error, no message
OPEN X [,Ss] [,Dd] [,Vv]
COMMANDS
is given.
Opens or creates sequential text file X, OPEN X, Lj [,Ss] [,Dd] [,Vv]
Opens or creates random-access text file X,
allocates one file buffer and prepares to
MON [,C] [,I] [,0] WRITE or READ from beginning of file. allocates one file buffer, and defines record
Causes display of disk £ommands ( C ), length as j bytes. Prepares to WRITE or READ
Input from the disk ( I ), and Output from beginning of Record 0. Same Length param-
to the disk ( 0). With no parameters, CLOSE [X] eter must be used each time file X is OPENed.
MON is ignored. Completes WRITE X, if necessary, and de-
allocates file buffer assigned to text file CLOSE [X] [,Ss] [,Dd] [,Vv]
X. Without file name, CLOSEs" all OPEN files Completes WRITE X, if necessary, and de-
NOMON [,C] [, I] [,0] (except an EXEC file).
allocates file buffer assigned to text file
Cancels display of disk £ommands ( C ),
X. Without file name, CLOSEs all OPEN files.
Input from the disk ( I ), and Output
to the disk ( 0). With no parameters, WRITE X [,Bb]
NOMON is ignored. Subsequent PRINTs send characters to
sequential text file X. WRITEing begins WRITE X [,Rr] [,Bb]
at current file position or (if specified) Subsequent PRINTs send characters to random-
access text file X. With no parameters,
MAXFILES n at byte b Cancelled by any DOS command.
Reserves n file buffers for disk input and WRITEing begins at current file position.
output (booting reserves 3 file buffers). With Rr parameter alone, WRITEing starts at
Use before LOADing or RUNning a program. byte 0 of Record r . With Bb parameter,
"READ X [,Bb]
WRITE s"tarts at byte b of current or spec-
Subsequent INPUTs and GETs take response ified Record. Cancelled by any DOS command.
characters from sequential text file X.
READing begins at current file position or
ACCESS COMMANDS (if specified) at byte b. INPUT response READ X [,Rr] [,Bb]
is one field (all characters to next Subsequent INPUTs and GETs take response
RETURN). Cancelled by any DOS command.
FP [,Ss] [,Dd] [,Vv] characters from random-access text file X
Puts system into Applesoft BASIC, With no parameters, READing starts at cur-
erasing any program in memory. APPEND X [,Ss] [,Dd] [,Vv] rent file position. With Rr parameter
Opens existing sequential text file X alone, READing starts at byte 0 of Record r.
similar to OPEN, but prepares to WRITE With Bb parameter, READing starts at byte
INT b of current or specified Record. INPUT
at the end of the file.
Puts system into Integer BASIC, response is one field (all characters to
erasing any program in memory. next RETURN). Cancelled by any DOS command.
POSITION X, Rp MACHINE-LANGUAGE FILE
In OPEN sequential text file X, subsequent
PRIf s READ or WRITE will proceed from p-th field COMMANDS
Sends subsequent output to slot s . Boots following current file position. BSAVE x, Aa, Lj [,Ss] [,Dd] [,Vv]
disk if slot s contains disk controller Stores on diskette, under file name X,
card. PRlf0 sends output to TV screen again. the contents of j memory bytes starting
EXEC X [,Rp] [,Ss] [,Dd] [,Vv] at address a.
Executes successive fields in sequential
INti s text file X as if typed at-keyboard.
Takes subsequent input from slot s . Boots With Rp parameter, execution begins with BLOAD X [,Aa] [,Ss] [,Dd] [,Vv]
disk if sl~t s contains disk controller p-th field. Fields may include numbered
Loads binary file X into same memory
card. INlf0 takes input from keyboard again. BASIC program lines and direct-execution locations from which file was BSAVEd or
BASIC or DOS commands to control the Apple. (if specified) starting at address a.
CHAIN Y [,Ss] [,Dd] [,Vv]
RUNs Integer BASIC program file Y, but does BRUN X [,Aa] [,Ss] [,Dd] [,Vv]
not clear variables developed by previous BLOADs binary file X, then jumps (JMP)
Integer BASIC program. to loaded file's first memory address.

You might also like