Loading and saving files

BASin

Loading and saving files

This section is more for adults and those with experience of files on a computer.

Traditionally, the Spectrum used cassette tapes for loading and saving programs and data.

With BASin, the commands LOAD, SAVE, MERGE, and VERIFY refer to files on your actual computer's hard disk. Full Windows paths are acceptable (such as c:\programs\fruit.bas), but be aware that programs that load or save with long paths will not work correctly on an original Spectrum. When no path is specified in a filename, the most recent path is used.

You can specify an empty filename if you wish to locate the file manually instead of typing its full path. For example, LOAD "" displays a dialogue box where you can select a file to open.

Note that although BASin for Beginners can LOAD any of the following formats, you can only save in the .szx format (a snapshot format) which will allow you to run your program on a real Spectrum Vega.

Programs are saved and loaded in .bas format or Spectrum Emulation Snapshot format. .bas format is a text representation of a BASIC program. Escape characters can be used to indicate embedded colour commands and UDG or graphics characters. In all load and save dialogs relating to programs, the .bas extension is assumed, and will be added if the user omits it in the filename. In all respects the emulated Spectrum receives the data from a .bas or snapshot file as if it were a tape block - program files are encoded into tokenised BASIC before being passed to the ROM for loading into the emulated memory space.

File formats

See the following topics for a detailed description of the file formats that BASin supports: