Home Page

BASIC Handbook

Basic2 Commands
Disk Drives
PEEK's and POKE's
RAM Memory Map
ROM Memory Map
Screen Display
ASCII and CHR$ Codes


Note: You will need to replace the '-' with the @ symbol.
This is to minimize spam.

My BASIC Quick Reference Guide

Abbreviation: S <SHIFT+A>

TYPE: Command
FORMAT: SAVE ["<file-name>"][,<device-number>][,<address>]

Action: The SAVE command is used to store the program that is currently in memory onto a tape or diskette file. The program being SAVED is only affected by the command while the SAVE is happening. The program remains in the current computer memory even after the SAVE operation is completed until you put something else there by using another command. The file type will be "prg" (program). If the <device-number> is left out, then the C64 will automatically assume that you want the program saved on cassette, device number 1. If the <device-number> is an <8>, then the program is written onto disk. The SAVE statement can be used be used in your programs and execution will continue with the next statement after the SAVE is completed.

Programs on tape are automatically stored twice, so that your Commodore 64 can check for errors when LOADing the program back in. When saving programs to tape, the <file-name> and secondary <address> are optional. But following a SAVE with a program name in quotes ("") or by a string variable (---$) helps your Commodore 64 find each program more easily. If the file-name is left out it can NOT be LOADed by name later on.

A secondary address of I will tell the KERNAL to LOAD the tape at a later time, with the program currently in memory instead of the normal 2048 location. A secondary address of 2 will cause an end-of-tape marker to follow the program. A secondary address of 3 combines both functions.

When saving programs onto a disk, the <file-name> must be present.


SAVE (Write to tape without a name)
SAVE"ALPHA",1 (Store on tape as file-name "alpha")
SAVE"ALPHA",1,2 (Store "alpha" with end-of-tape marker)
SAVE"FUN.DISK",8 (SAVES on disk (device 8 is the disk))
SAVE A$ (Store on tape with the name A$)
10 SAVE"HI" (SAVEs program and then move to next program line)

(Stores at same memory location and puts an end-of-tope marker on)

Commodore Cheetah made by Allen Monks, started in the year 2000.