|
|
|
|
|
Sinclair BasicSinclair 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. 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. Reserved words 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 also introduced: - PLAY, SPECTRUM
Timex BASIC, used on the Spectrum-compatibles TS2048 and TS2068, has the following six keywords on top of the ordinary Sinclair BASIC ones: - DELETE, FREE, ON ERR, RESET, SOUND, STICK
Notes - 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 it is 10 IF V=5 THEN GOTO 50 20 GO TO 100 - LET is compulsory (i.e., «LET A=1» but never «A=1»).
References - Ardley, Neil (198X). Sinclair ZX Spectrum+ User Guide. Dorling Kindersley in association with Sinclair Research. ISBN 0-86318-080-9.
|
 |
|
| Copyright 2005-2009 OnPedia.com. All Rights Reserved |
|
|