SECTION 10

[continue/next section] [MAIN/Introduction] [table of contents]

10. Storing and Reusing Your Programs in C64 Mode


TABLE OF CONTENTS

10.1 FORMATTING A DISK IN C64 MODE

10.2 THE SAVE COMMAND

10.2.1 SAVEing on Disk
10.2.2 SAVEing on Cassette

10.3 THE LOAD AND RUN COMMANDS

10.3.1 LOADing and RUNning from Disk
10.3.2 LOADing and RUNning from Cassette

10.4 OTHER DISK-RELATED COMMANDS

10.4.1 Verifying a Program
10.4.2 Displaying Your Disk Directory
10.4.3 Initializing a Disk Drive

Once you have edited a program, you will probably want to store it permanently so that you will be able to recall and use it at some later time. To do this you need either a Commodore disk drive or the Commodore Datassette.

10.1 FORMATTING A DISK IN C64 MODE

To store programs on a new (or blank) disk, you must first prepare the disk to receive data. This is called formatting the disk. Make sure that you turn on the disk drive before inserting any disk.

To format a blank disk, in C64 Mode, you type this command:

OPEN 15,8,15:PRINT#15,"N0:NAME,ID" {return}

In place of NAME, type a disk name of your choice; you can use up to 16 characters to identify the disk. In place of ID, type a two character code of your choice (such as W2 or 10).

The cursor disappears during the formatting process. When the cursor blinks again, type the following command:

CLOSE 15 {return}

NOTE: Once a disk is formatted in C64 or C128 mode, that disk can be used in either mode.

10.2 THE SAVE COMMAND

You can use the SAVE command to store your programs on disk or tape.

10.2.1 SAVEing on Disk

If you have a Commodore single disk drive, you can store your program on disk by typing:

SAVE "PROGRAM NAME",8 {return}

The {8} indicates to the computer that your are using a disk drive to store your program.

The same rules apply for the PROGRAM NAME whether you are using disk or tape. The PROGRAM NAME can be anything you want it to be. You can use letters, numbers and/or symbols - up to 16 characters in all. Note that you must enclose the PROGRAM NAME in quotation marks. The cursor on your computer disappears while the program is being SAVEd, but it returns when the process is completed.

10.2.2 SAVEing on Cassette

If you are using a Datassette to store your program, insert a blank tape in the recorder, rewind the tape (if necessary) and type:

SAVE "PROGRAM NAME" {return}

10.3 THE LOAD AND RUN COMMANDS

Once a program has been SAVEd, you can LOAD it back into the computer's memory and RUN it anytime you wish.

10.3.1 LOADing and RUNning from Disk

To load your program from a disk, type:

LOAD "PROGRAM NAME",8 {return}

Again, the {8} indicates to the computer that you are working with a disk drive.

To RUN the program, type RUN and press {return}

10.3.2 LOADing and RUNning from Cassette

To LOAD your program from cassette tape, type:

LOAD "PROGRAM NAME" {return}

If you do not know the name of the program, you can type:

LOAD {return}
and the next progam on the tape will be retrieved.

You can use the counter on the Datassette to identify the starting position of the programs. Then, when you want to retrieve a program, simply wind the tape forward from 000 to the program's start location, and type:

LOAD {return}

In this case, you do not have to specify the PROGRAM NAME; your program will load automatically because it is the next program on the tape.

NOTE: During the LOAD process, the program being LOADed is not erased from the tape; it is simply copied into the computer. However, LOADing a program automatically erases any BASIC program that may have been in the computer's memory.

10.4 OTHER DISK-RELATED COMMANDS

10.4.1 Verifying a Program

To verify that a program has been correctly saved or loaded, type:

VERIFY "PROGRAM NAME",8 {return}

If the program in the computer is identical to the one on the disk, the screen display will respond with the letters {OK}.

The VERIFY command also works for tape programs. You type:

VERIFY "PROGRAM NAME" {return}

Note that you do not enter the comma and the number 8, since 8 indicates that you are working with a disk program.

10.4.2 Displaying Your Disk Directory

To see a list of the programs on your disk, first type:

LOAD "$",8 {return}

The cursor disappears during this process. When the cursor reappears, type:

LIST {return}

A list of the programs on your disk then will be displayed. Note that when you load the directory, any program that was in memory is erased.

10.4.3 Initializing a Disk Drive

If the disk drive's ready light is blinking, it indicates a disk error. You can restore the disk drive to the condition it was in before the error occurred by using a procedure called INTITIALIZING. To initialize a drive, you type:

OPEN 1,8,15,"I":CLOSE 1 {return}

If the light is still blinking, remove the disk and turn the drive off, then on.

For further information on SAVEing and LOADing your programs, refer to your disk drive or Datassette manual. Also consult the LOAD and SAVE command descriptions in the Chapter V, BASIC 7.0 Encyclopaedia.

[top of document]

Portions of this page are (C) by Commodore.ca and this site is hosted by www.URTech.ca 
If you want to use any images or text from this site you must get written approval first.  Click HERE to send an email request explaining your intended usage.
Site Meter