ZX SPECTRUM 128
Introduction

Sinclair ZX Spectrum
STORING DATA IN MEMORY
The additional memory in your Spectrum 128 can be used for running large machine code programs. It can also be used by BASIC to store programs and data in much the same way as a cassette or Microdrive - but many times faster.

This type of storage is called a RAM disk and it allows BASIC programs to manipulate data in much the same way as professional programs on big machines.

An important difference between RAM storage and a cassette or Microdrive is that the data will be lost as soon as the power is switched off or the reset button is pressed. It will also be as good as lost if you type SPECTRUM. Always save your work to cassette or Microdrive before doing any of these things. Data which has been stored in RAM will not be affected by a NEW command.

All the commands for RAM disk storage are the same as cassette commands except that an exclamation mark (!) must be typed after the keyword, e.g.



SAVE! "program" LINE 10
LOAD! "program"
SAVE! "picture" SCREEN$
LOAD! "physics" DATA p()
MERGE! "overlay"




The VERIFY keyword is not used with the RAM disk.

You can get an alphabetic catalogue of all the files (programs and data) saved in RAM by typing


CAT!

Individual files can be removed by typing


ERASE! "filename"




MUSIC AND SOUND


The Spectrum 128 has two different ways to make music and sound effects. Both work through the sound channel of your TV or can be sent to an external amplifier as explained on page 3. There is no internal speaker.

The first method uses the Spectrum BASIC BEEP command (see pages 36-37 and 53 of the ZX Spectrum User Guide). But 128 BASIC also has the PLAY command which allows you to make sophisticated music with up to three notes at once. It also gives you more control over the sound of each individual note than is possible using BEEP.

The PLAY command can be used to let your Spectrum 128 play tunes on many types of synthesizer and other electronic musical instruments, such as drum machines. The Spectrum 128 is MIDI (Musical Instrument Digital Interface) compatible, which allows it to be connected to any other equipment which conforms to the MIDI standard.


Programming sounds



Making music and sound effects with PLAY is simple. You just type in the series of notes that make up a tune, then ask the Spectrum 128 to PLAY them. You can also include instructions that tell the Spectrum 128 what sort of tone you want for the sound.

To hear some of the wide range of sounds that you can make, type in one of the two following programs, RUN it, then try the other example, Don't worry if the program lines look complicated, they are explained in detail later


MUSIC



10 LET a$="T180O6(CDEC)(5EF7G)(3GAGF5EC)5Cg7C9CgC"
20 LET b$="O4(CDEC)(5EF7G)(3GAGF5EC)5Eb7E9EbE"
30 LET c$="O3(7CG)(7CG)(7CG)5GD7G9GDG"
40 PLAY a$,b$,c$

Sinclair ZX Spectrum

  Previous Page Back Next Page