Sinclair BASIC

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.

Contents

Original Sinclair BASIC

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$</u>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

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

  1. AND, NOT, and OR are logical operators.
  2. CAT, CLOSE#, ERASE, FORMAT, MOVE, and OPEN# are Microdrive-related file system commands/statements. Their use produces an error when a Microdrive is not connected.
  3. String variables must consist of only one alphabetical character.
    Thus, «LET A=5», «LET Apples=5», and «LET A$="Hello"» are all good, while «LET APPLES$="Fruit"» is not.
  4. 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
  5. 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.

Template:Section-stub

References

External links

  • The History of Sinclair BASIC (http://www.worldofspectrum.org/sinclairbasic/history.html) – By Andrew Owen, whose Sinclar BASIC website is hosted by World of Spectrum

See also

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools