Save And Dsave (Writing A Program To A Diskette); Safety Feature, Header Command.20 Save Command - Commodore 2031 User Manual

Hide thumbs Also See for 2031:
Table of Contents

Advertisement

Where:
lfn = logical file number (any number between 1 and 255)
fn = file name supplied by user
x =
dr = disk drive number: both Dx and dr default to 0
8 = device number (8 for disk, 2 for second cassette, 4 for printer)
sa = secondary address
t = file type
All upper-case characters shown in format are essential for the proper execution
of a command and must by typed by user. These commands are entered via the
keyboard using unshifted characters only. On the CBM Business Model they
will appear in lower case.
BASIC 3.0 commands are upward compatible with BASIC 4.0 commands. Each
command will be defined along with a brief example to illustrate their use As
soon as your dual drive floppy disk is attached to your computer and has passed
the performance test, we encourage you to try the examples
and procedures.
SAVE and DSAVE
(Writing A Program To A Diskette)
If a program is in computer memory, it can be moved to a diskette for storage.
This is accomplished with the SAVE (any Commodore BASIC) or DSAVE
(BASIC 4.0) commands.
Any data transferred with the SAVE or DSAVE commands are automatically
designated by the DOS as a program (PRG) file. Both commands transfer PRG
files from the computer's memory to the specified diskette. You must specify the
drive number, the program name, and the device number. The device number
will default to device 1 which is the tape unit if it is not specified.
The format of SAVE is:
Where:
This following example illustrates creating a one line program, SAVEing it on
the diskette under the name TESTPROG, and VERIFYing that it is resident on
disk.
28
SAVE"dr:fn",dn
dr = is the disk drive number. It must be 0.
fn = is any file name of 16 characters or less you wish to assign
to the file to be transferred to the diskette. Blanks are
counted as characters.
dn = is the device number (in this case 8).

Advertisement

Table of Contents
loading

Table of Contents