Science Fair Project Encyclopedia
Sinclair BASIC (taking its name from innovator Sir Clive Sinclair) is a dialect of the BASIC programming language used in the home computers from Sinclair Research and Timex Sinclair. Sinclair BASIC was made by Nine Tiles Networks Ltd.
Originally developed in 1979 to fit in the 4 KB ROM of the ZX80, it was initially an incomplete implementation of the 1978 ANSI minimal BASIC standard and evolved through the 8K ROM ZX81 and Timex Sinclair 1000 (TS1000) to be an almost complete version in the 16K ROM ZX Spectrum.
Original Sinclair BASIC
On the Spectrum there are 86 reserved words in Sinclair BASIC, denoting commands, statements, combined commands/statements, functions, and other keywords :
- ABS, ACS, AND1, ASN, AT, ATN, ATTR, BEEP, BIN, BORDER, BRIGHT, CAT2, CHR$3, CIRCLE, CLEAR, CLOSE#2, CLS, CODE3, CONTINUE, COPY, COS, DATA, DEF FN, DIM, DRAW, ERASE2, EXP, FLASH, FN, FOR, FORMAT2, GO SUB, GO TO, IF4, IN, INK, INKEY$3, INPUT, INT, INVERSE, LEN, LET5, LINE, LIST, LLIST, LN, LOAD, LPRINT, MERGE, MOVE2, NEW, NEXT, NOT1, OPEN#2, OR1, OUT, OVER, PAPER, PAUSE, PEEK, PI, PLOT, POINT, POKE, PRINT, RANDOMIZE, READ, REM, RESTORE, RETURN, RND, RUN, SAVE, SCREEN$3, SGN, SIN, SQR, STEP, STR$3, TAB, TAN, THEN 4, TO, USR, VAL3, VAL$3, VERIFY
Statements/commands found exclusively on the ZX81, TS1000 and TS1500 are:
- FAST, SCROLL, SLOW, UNPLOT, GOSUB/GOTO (vs the Spectrum's GO SUB/GO TO)
The 128K models introduced two commands:
- PLAY, SPECTRUM
- DELETE, FREE, ON ERR, RESET, SOUND, STICK
- AND, NOT, and OR are logical operators.
- CAT, CLOSE#, ERASE, FORMAT, MOVE, and OPEN# are Microdrive-related file system commands/statements.
- String variables must only be one alphabetical character.
Thus, «LET A=5», «LET Apples=5», and «LET A$="Hello"» are all good, while «LET APPLES$="Fruit"» is not.
- There is no ELSE operator in the IF - THEN (- ELSE) chain.
Thus, instead of
10 IF V=5 THEN GO TO 50 ELSE GO TO 100
10 IF V=5 THEN GOTO 50
20 GO TO 100
- LET is compulsory (i.e., «LET A=1» but never «A=1»).
Sinclair Extended BASIC
This extended version of Sinclair BASIC was used on the Amstrad-developed/manufactured Spectrum +2 and +3 machines.
- Ardley, Neil (198X). Sinclair ZX Spectrum+ User Guide. Dorling Kindersley in association with Sinclair Research. ISBN 0-86318-080-9.
- The History of Sinclair BASIC – By Andrew Owen, whose Sinclar BASIC website is hosted by World of Spectrum
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details