This instruction is available in DM-System2 Basic, MSX2-SAS Basic and QuickDisk Basic.
Contents |
CALL SAVE in DM-System2 Basic
Effect
Saves data to a new file or to a location in an already existing file.
Note: The data recorder is not supported by this instruction.
Syntax
CALL SAVE ("<Device>:\<Path>\<Filename>",@<SourceAddress>,<Length>,<Offset>)
The last parameter is optional.
Notes:
- Character backslash (\) serves as a separator between the folders and the file name in MSX-DOS2. You don't have to put it after the colon of the device name.
- Character backslash is replaced by the character yen (¥) on Japanese MSX or the character won (₩) on Korean MSX.
- Parameters can not end with a comma alone.
Parameters
<Device> 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. |
Linked computer | COM | Requires RS-232C interface |
By default, the saving will be made from the current active drive (generally drive A) in the other cases.
<Path> is used to specify the location in folders of file to save. Each folder name in path are separate by a backslash (\). This parameter is only available in version 2 of Disk BASIC.
<Filename> is the name of file to save the data.
<SourceAddress> is source address of data to save. If the address is preceded by an at sign (@) the data will be saved from VRAM instead of RAM.
<Length> is data length to save
<Offset> is a value relative to start address in file, it indicates the location to save new data.
Related to
CALL CHGDRV, CALL FILES, CALL FSIZE, CALL LOAD
Compatibility
CALL SAVE in MSX2-SAS Basic
Effect
Saves the BASIC source, which is currently in the RAM, to disk as single file or additional file, when you have split your code in several parts.
Associated function key in set 2: F3
Syntax
CALL SAVE("<Device>:<Filename>",A)
Note: The final part ",A) can be omitted if you don't use the A parameter.
Parameters
<Device> is the name for used device. It can only be a disk drive.
If you don't specify the drive, the computer will use currently active drive (by default, it's drive A:)
Device type | Device name | Remark |
---|---|---|
Disk drive | A, B, C, D, E, F, G, H | A floppy disk interface can control up to 2 drives. |
<Filename> is a string that contains the file name you want to use to save BASIC source. The format is 8 characters followed by a point and an extension with 3 characters. (Not case sensitive) - It can be omitted when you want to save again after modifications of the source.
You can always omit the extension because the instruction will automatically add the ASF extension (ASF = ASCII Source File). Besides, if you update an existing ASF file and save it, the extension of the old file will become BSF = Back-Up Source File.
When the parameter A is indicated, it will mean that the file to save will have the status of additional file.
Example
_SAVE("RAMSLOT")
Related to
Compatibility
CALL SAVE in QuickDisk Basic
Effect
Saves the BASIC program or DATA present in the MSX memory to a Quick Disk device.
The DATA will always be saved in ASCII text. The BASIC program can be saved in ASCII text or in tokenized mode.
Note: You can also press the F8 function key
Syntax
CALL SAVE ("QDn:<Filename>",A)
Specify at least the <Filename>. Parameters can not end with a comma alone.
Parameters
QD specifies used device is the Quick Disk. Value n can vary between 0 and 7. By default, the loading will be made from Quick Disk device 0.
<Filename> is the file name in format of 8 characters followed by a point and an extension with 3 characters. This extension can be used to make the difference between BASIC files (extension BAS) and DATA files (extension DAT).
When the parameter A is indicated, the BASIC program will be saved in ASCII text otherwise it will be saved as it is (tokenized format).
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.
Related to
CALL LOAD, CALL MERGE, CALL RUN