SINCLAIR ZX SPECTRUM — BASIC Programming
By Steven Vickers
Edited by Robin Bradbeer
Original edition published in 1982-83
by Sinclair Research Limited
This version published in 1995
by Chris Owen on behalf of Amstrad plc
Cover illustration by
John Harris of Young Artists
© Amstrad plc 1995 - all rights reserved
This manual is freely distributable but may
not be distributed without this notice.
Converted to e-text in various forms:
- Chris Owen (ASCII)
- Pete (HTML)
- Albert Stuurman, Istvan Novak (MarkDown)
TABLE OF CONTENTS
A guide to the ZX Spectrum keyboard and a description of the display.
Programs, line numbers, editing programs using ↑ ,↓ and EDIT, RUN, LIST, GO TO, CONTINUE, INPUT, NEW, REM, PRINT, STOP in INPUT data, BREAK.
IF, STOP, =, <, >, <=, >=, <>.
FOR, NEXT, TO, STEP. Introducing FOR-NEXT loops
GO SUB, RETURN.
Mathematical expressions using +, -, *, /, scientific notation and variable names.
Handling strings and slicing.
User-definable functions and others readily available on the ZX Spectrum using. DEF, LEN, STR$, VAL, SGN, ABS, INT, SQR, FN.
Including simple trigonometry: ↑, PI, EXP, LN, SIN*, COS, TAN, ASN, ACS, ATN.
Using RANDOMIZE and RND.
Strings and numeric arrays - DIM.
Logical expressions, AND, OR, NOT.
A look at the ZX character set including graphics and how to construct your own graphic characters: CODE, CHR$, POKE, PEEK, USR, BIN.
Some more complicated uses of these commands using separators: : , ; ‘ , TAB, AT, LINE and CLS.
INK, PAPER, FLASH, BRIGHT, INVERSE, OVER, BORDER.
PLOT, DRAW, CIRCLE, POINT.
Animated graphics using PAUSE, INKEY$ and PEEK.
The sound capabilities of the ZX Spectrum using BEEP.
How to store your programs on cassette tape: SAVE, LOAD, VERIFY, MERGE.
LLIST, LPRINT, COPY.
Connecting the ZX Spectrum to other machines and devices.
Input/Output ports and their uses: IN, OUT.
A look at the internal workings of the ZX Spectrum: CLEAR.
Introducing USR with a numeric argument.