SAVE
This page was last modified 02:04, 21 July 2018 by Mars2000you. Based on work by NYYRIKKI and Gdx.

Contents

Effect

Saves on a device the BASIC program present in the MSX memory.

If you use cassette, the program will be saved in ASCII mode.

If you use another device, the program can be saved in ASCII text or in tokenized format.

Syntax

SAVE "[<devicename>:][\<path>][\]<filename>"[,A]

Note: Character backslash (\) is used in Disk BASIC 2.x. It is replaced by the character yen (¥) on Japanese MSX.

Parameters

<devicename> is the name for used device. (see table below)

Device type Device name Remark
Disk drive A, B, C, D, E, F, G, H A floppy disk interface can control until 2 drives.
Data recorder CAS Not available on MSX Turbo R
Data cartridge CAT Requires Sony HBI-55 or Yamaha UDC-01
Linked computer COM Requires RS-232C interface
Memory disk MEM Created with CALL MEMINI


By default, the saving will be made to tape on a system without any disk drive, to the current active drive (generally drive A) in the other cases.

<path> is used to specify the location in folders where you want save the file. Each folder name in path are separate by a backslash (\). This parameter is only available in version 2 of Disk BASIC.

<filename> is a string that contains the file name of Basic program to save.

When the file is saved on tape the format of file name is case sensitive and limited to 6 characters without extension. If another device is used, then the format is 8 characters followed by a point and an extension with 3 characters. (Not case sensitive)

When the parameter A is indicated, the BASIC program will be saved to ASCII codes otherwise it will be saved as it is (tokenized format).

Parameter A is only useful if you save on disk or another computer and want to get the program in ASCII mode.

ASCII text and Tokenized format

The tokenized format allows a faster loading than the loading of the same BASIC program in ASCII text and the loaded program takes less space in the MSX memory.

However, contrary to the ASCII text, the listing of the program can't be directly displayed and read. Besides, RUN needs to be used after loading with CLOAD instead of using RUN as unique instruction.

Related to

CALL MEMINI, CLOAD, CSAVE, LOAD, MERGE, RUN

Compatibility

MSX-BASIC 1.0 or higher