The ZX Spectrum + has its own language, the computer language known as BASIC. To get it to obey your instructions, you have to program the Spectrum by talking to it in BASIC. You do this by operating the Spectrum’s keyboard. Furthermore, the GRAPH This key is used to select the shapes or graphics characters on keys 1 to 8. If you press this key and then press a number key with or without the CAPS SHIFT key, a graphics character will appear on the screen. The keyboard allows you to control the computer while it is running your programs. The dialect (version) of BASIC that the Spectrum understands is a simple but powerful form of this language. Its designed to be as much like English as possible to make it easy to use. In addition, the Spectrum has one great feature that makes programming much easier. This is the single-key keyword entry system.
TRUE VIDEO and INV VIDEO
These keys insert control codes into program lines to produce normal or inverse colours.
This key is used if you press a wrong key and want to remove a keyword, letter, number or sign.
This key is used to change a line in a program without completely rewriting it.
This key selects the upper keyword above the raised section of any key. When followed by SYMBOL SHIFT and a key, it selects the sign or keywork immediately above the raised section of the key.
Press this key with a letter key to produce a capital letter. If you want a number of letters to appear in capitals, use CAPS LOCK.
Use this key if you want the letter keys to produce capital (upper-case) letters all the time. Press it again to get small (lower-case) letters.
Keys and Keywords
Keywords are special words in BASIC that instruct the computer to do something —words like PRINT and INPUT. On most computers you have to key in each letter of a keyword as you would on a typewriter, and you must spell each word absolutely correctly. But on the Spectrum, you simply press a single key to get a whole keyword on the screen. Sinclair BASIC has over 80 keywords, accessed by a total of 36 keys (26 letter keys and 10 number keys). Because the Spectrum uses such a wide range of BASIC instructions, many keys produce not one but several keywords which the computer will recognize. Most keys actually give you keywords as well as a letter, number, sign or even a shape (graphics character) all of which can be used in programs.
Selecting Keywords and Signs
On the Spectrum keyboard, there are two keys which you will be using a lot. These are EXTEND MODE and SYMBOL SHIFT, and they are the keys which let you choose which of the keywords and signs on the other keys you want to appear on the screen. You have already had a brief introduction to keying in with these keys on page 8. Now, after you have familiarized yourself with the keyboard layout, the next two pages will show you exactly how to select anything that appears on the computer’s keyboard. Once you know how to do this, you can begin to write your own programs. Number keys As well as producing numbers, these keys can put control codes in programs for the colours shown. The keywords immediately above the key-tops from 4 to 0, except key 8, are used only with ZX Microdrives.
HOW TO OPERATE THE KEYS
You can get as many as six different keywords, letters, numbers or signs from most keys on your ZX Spectrum +. However, selecting a character or keyword on the board is not complicated once you become familiar with one of the Spectrum’s special features. If you press a key, the result that appears on the screen depends upon the mode that the computer is in at that moment. The different modes each let you key in different types of information, like keywords, letters or graphics characters. The advantage of this is that as you operate the keyboard, the Spectrum actually helps you in choosing keyboard modes so that you enter instructions and information in the right order. On these two pages you will find out exactly what the modes do.
Switch on or reset your Spectrum so that the copyright message appears. Now press ENTER. A flashing K appears in the bottom left-hand corner. The flashing square is called the cursor. It shows you where something is going to appear on the screen and the K indicates that the computer is in keyword mode. Press any letter key and the top keyword on the raised section of the key appears on the screen. Try Q, for example, and the keyword PLOT appears. Press the DELETE key to remove the keyword and try other keys. Number keys will give numbers, but as soon as you press a letter key, the top keyword on the raised section appears. Use DELETE again so that the K cursor reappears. Now press either SYMBOL SHIFT key, hold it down and press any letter key. This time, the keyword or sign just above the letter on the raised section appears. With a number key, the sign to the right on the raised section appears. So, keyword mode relates to the raised section of the key.
Letter and capitals modes
Having produced a keyword or sign in keyword mode, the computer automatically changes the cursor to L. It is now in letter mode. Press any letter key and the lower-case (small) letter appears. Press a number and the number appears. If you want to get a capital letter, hold down CAPS SHIFT and then press the letter key. If you want all capital letters, then press CAPS LOCK first. The cursor changes to C. Your Spectrum is now in capitals mode and you get a capital letter every time you press a letter key. You still get numbers in capitals mode. To return to letter mode (L), press CAPS LOCK again.
The next mode is called extended mode and it is produced by pressing the EXTEND MODE key. The cursor now changes to E. Press any letter key, and the top keyword of the pair of keywords above the raised section
is given. For example, press B and you get BIN. To get the bottom keyword or sign above the raised section, press either SYMBOL SHIFT key first and hold it down, then press the letter key. On key B, for example, you now get BRIGHT. So in extended mode, you get the pair of keywords above the raised section of the key. After pressing a key (or EXTEND MODE) in extended mode, the computer automatically returns to letter or capitals mode.
The fifth mode is called graphics mode and it is produced by pressing the GRAPH key. The cursor changes to G. Press keys 1 to 8 and see that the graphics characters marked on these keys appear. Now press CAPS SHIFT and any number from 1 to 8. The graphics appear again, but this time black and white are reversed. To leave graphics mode, you must always press GRAPH again, as the computer does not leave it automatically.