Update to 1.16.0 completed.

Please add any new defect you notice here!


Update auf 1.16.0 abgeschlossen.

Bitte neue Defekte hier vermerken!

SAVE

From C64-Wiki

Jump to: navigation, search
BASIC keyword
Keyword:SAVE
Abbreviation:S Shift+A
Type:Command
Token code:148/$94
Handling routine
in BASIC ROM:
57686–57700
$E156–E164
List of all BASIC keywords


Remark: This article describes the BASIC-Command SAVE in BASIC V2 at the Commodore 64.

Typ: Statement
General Programming-Syntax: SAVE ["<filename>"] [,<device number>] [,<secondary number>]

A written BASIC- or computer code program, which is temporary in the RAM-memory, can be saved with the BASIC-Command SAVE permanent to a storage device like datasette, diskdrive or harddisk as filetype program (PRG). The Command SAVE can be used in BASIC-Programs, too.

For saving programs on diskdrive or harddisk, it must be entered a filename. By saving on datasette a filename isn't needed. But for fast finding of files, it is be usefull only to save programs with filenames. Programs, which are saved on datasette, will be saved twice times. This is eased for VERIFYING (look VERIFY).

The device number is needed for the computer, which relaised the correct storage device:

  • datasette (device number 1)
  • diskdrives (device numbers 8-11, optional first diskdrive 8, second diskdrive 9, etc.)

When isn't used a device number, the computer uses the first device: datasette.

With the secondary number knows the computer, which must be load a program.

,0 The program will be saved as BASIC-Program 
,1 The programm will be saved absolute. Needed for computer code programs.
,2 Is only needed by datasette for writing marker "end of tape" (EOT)

When isn't used a secondary number, the computer uses the ,0.


[edit] Beispiele

SAVE
(anonymous writing as BASIC-Program on a datasette)
SAVE "FILENAME",1
(saved as BASIC-Program with filename on datasette)
SAVE FILE$,1,2
(saved as BASIC-Program with charstring FILE$ on datasette with marker "end of tape")

SAVE "DATEINAME",9,1
(saved a Program with filename on secondary diskdrive 9 absoulte)
10 REM tool at tape / cassette
20 SAVE "THISPROGRAMM",8: REM SAVING ON DISK
30 REM the program continued 
BASIC V2.0-Commands of Commodore 64

ABS | AND | ASC | ATN | CHR$ | CLOSE | CLR | CMD | CONT | COS | DATA | DEF | DIM | END | EXP | FN | FOR | FRE | GET | GET# | GOSUB | GOTO | IF | INPUT | INPUT# | INT | LEFT$ | LEN | LET | LIST | LOAD | LOG | MID$ | NEW | NEXT | NOT | ON | OPEN | OR | PEEK | POKE | POS | PRINT | PRINT# | READ | REM | RESTORE | RETURN | RIGHT$ | RND | RUN | SAVE | SGN | SIN | SPC( | SQR | STATUS/ST | STEP | STOP | STR$ | SYS | TAB( | TAN | THEN | TIME/TI | TIME$/TI$ | TO | USR | VAL | VERIFY | WAIT

 
Personal tools
Help and Feedback
In other languages