Sinclair BASIC
Template:DMCA Template:DMCA Template:Short description Script error: No such module "For".
Page Module:Infobox/styles.css has no content.
| Sinclair BASIC | |
|---|---|
| Paradigm | Imperative |
| Designed by | John Grant, Steve Vickers |
| Developer | Nine Tiles Networks, Sinclair Research |
| First appeared | 1980 |
| Template:Infobox software/simple | |
| Platform | ZX80, ZX81, ZX Spectrum, +, 128, +2, +3, T/S 2068, TC 3256 |
| License | Proprietary |
Sinclair BASIC is a dialect of the programming language BASIC used in the 8-bit home computers from Sinclair Research, Timex Sinclair and Amstrad. The Sinclair BASIC interpreter was written by Nine Tiles Networks Ltd.[1]
Designed to run in only 1 KB of RAM, the system makes a number of decisions to lower memory usage. This led to one of Sinclair BASIC's most notable features, that the keywords were entered using single keystrokes; each of the possible keywords was mapped to a key on the keyboard, when pressed, the token would be placed into memory while the entire keyword was printed out on-screen. This made code entry easier whilst simplifying the parser.
The original ZX80 version supported only integer mathematics, which partially made up for some of the memory-saving design notes which had negative impact on performance. When the system was ported to the ZX81 in 1981, a full floating point implementation was added. This version was very slow, among the slowest BASICs on the market at the time, but given the limited capabilities of the machine, this was not a serious concern. The low speed was not mainly due to an inefficient interpreter though, it was an effect of the fact that 70-80% of the machine cycles were consumed by the video hardware. So the Z80 in the ZX81 clocked at 3.25 MHz was "in effect" running at well below 1 MHz from the perspective of the BASIC system.
Performance became a more serious issue with the release of the ZX Spectrum in 1982, which ran too slowly to make full use of the machine's new features. This led to an entirely new BASIC for the following Sinclair QL, as well as a number of 3rd-party BASICs for the Spectrum and its various clones. The original version continued to be modified and ported in the post-Sinclair era.
History
Clive Sinclair initially met with John Grant, the owner of Nine Tiles, in April 1979 to discuss a BASIC for Sinclair's new computer concept.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Sinclair was inspired to make a new machine after watching his son enjoy their TRS-80, but that machine's £500 price tag appeared to be a serious limit on its popularity. He wanted a new kit that would expand on their previous MK14 and feature a built-in BASIC at the target price of £79.95. To meet this price point, the machine would ship with only 1 KB of RAM and 4 KB of ROM. Grant suggested using the Forth language instead, but the budget precluded this. Grant wrote the BASIC interpreter between June and July 1979, but the code initially came in at 5 KB and he spent the next month trimming it down. It was initially an incomplete implementation of the 1978 American National Standards Institute (ANSI) Minimal BASIC standard with integer arithmetic only, termed 4K BASIC.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
Even before the ZX80 was introduced in February 1980, the constant downward price-pressure in the industry was allowing the already inexpensive design to be further reduced in complexity and cost. In particular, many of the separate circuits in the ZX80 were re-implemented in a single uncommitted logic array from Ferranti, which allowed the price to be reduced to only £49.95 while increasing the size of the ROM to 8 KB. This work was assigned to Steve Vickers, who joined Nine Tiles in January 1980. Whilst Grant worked on the code interfacing with hardware, Vickers used the larger space to introduce floating-point arithmetic and a suite of trig functions, which were expected of any BASIC from that era, producing 8K BASIC.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. The initial version did not support the ZX Printer and had a bug in its square root function. Nine Tiles provided a new version to address these, but Sinclair was slow to include the new version in the ROMs. The new ROMs were eventually offered to owners of the earlier ZX80 as well.[2]
When Sinclair lost the contest to build the BBC Computer, he moved ahead with plans to produce a low-cost colour-capable machine that emerged as the ZX Spectrum of April 1982. ROM space would once again be increased, this time to 16 KB. In keeping with his philosophy of making systems for the lowest possible expenditure, Sinclair wanted the absolute minimum changes to the existing 8K BASIC. Although Nine Tiles felt that something much better would be needed for the new machine, the schedule would not allow it, and yet another expansion of the original code was produced. Due to the RAM also being increased, to 48 KB, this version was known as 48K BASIC and eventually 48 BASIC with the introduction of the ZX Spectrum 128 at which time the 16 KB Spectrum was no longer sold and most existing ones in use had been upgraded to 48 KB.[3][4] The new version was available near the end of 1981, but it was "depressingly slow" and "snail like". Additionally, as no prototypes were available until the end of the year, it lacked support for the new line of peripherals Sinclair was planning.[5]
In February 1982, Nine Tiles began to have disagreements with Sinclair over owed royalties for the various manuals that Nine Tiles had produced. Around the same time, Vickers and his Sinclair counterpart, Richard Altwasser, left their respective companies to start the Jupiter Ace project.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. When the Spectrum was launched the ROM was still not complete, and although Nine Tiles continued working on it until April 1982, by that point 75,000 Spectrums had already been sold and the project was cancelled. The missing functionality was later added by additional code in the ZX Interface 1. After Nine Tiles and Sinclair went their own ways, several new versions of 48 BASIC were created.
In 1983, as part of introducing the Spectrum to the US market as the TS2068, Timex modified it as T/S 2000 BASIC. The new version was incapable of running many Spectrum programs due to the memory location of machine's functions moving. A similar, but somewhat more compatible version, was introduced as part of the Spanish Spectrum 128 of 1985, 128 BASIC.[4]
Amstrad purchased Sinclair Research in 1986. As Sinclair had never owned the copyright to the language, Amstrad had to arrange a new license with Nine Tiles. Several other versions also appeared in this period as various extensions and clones of the Spectrum were introduced. These included +3 BASIC, BASIC64 and Timex Extended Basic.[4][3]
As of 2015, interpreters exist for modern operating systems,[6] and older systems,[7] that allow Sinclair Basic to be used easily.
Description
Program editing
Like most home-computer BASICs, Sinclair BASIC is anchored around its line editor. When the machine is booted, it runs BASIC and displays an inverse video "K" at the bottom of the screen to indicate the entry point. When a line is entered and the Script error: No such module "key". key is pressed, it either runs immediately if it does not have a line number prefix, or clears the screen and performs the equivalent of a LIST command, placing a ">" cursor after the line number in the most recently entered line.
In contrast to most machines of the era, the editor does not allow freeform editing at any point on the screen. Instead, when the user presses Script error: No such module "key"., the current line of code is copied back to the bottom of the screen. The user can move horizontally through this line using the cursor keys and commits their changes by pressing Script error: No such module "key". again. In contrast, on machines like the Commodore 64 or Atari 8-bit computers, the up and down keys can be used to move among the lines in the program and edit them in-place.
The most notable feature of the editor is that keywords are entered using single keystrokes. For instance, on the ZX81, the Script error: No such module "key". key on the keyboard would cause the entire keyword PRINT to be entered into the currently editing line. Once a keyword has been entered, the cursor changes to an "L" to indicate what follows will be interpreted as normal text. For instance, pressing Script error: No such module "key". again at this point would enter a single letter "P".
Keys generally had two separate keywords assigned to them – one above it and one below. Pressing the key in "K" mode would enter the keyword above the key, like PRINT for Script error: No such module "key".. If the system was in "L" mode, one could return to "K" by pressing the shift key – the systems did not initially support lowercase text, so the shift was not otherwise needed. The keywords below the keys required a second keystroke, Script error: No such module "key"., which put the editor into "function mode", changing the cursor to an "F". Entering common code often resulted in a significant number of keystrokes.
The system has the advantage of representing all multi-character keywords as a single character in memory, which was a significant savings in the early machines that shipped with only 1 KB of RAM. This single-character representation included multi-character items like <>. This has the added advantages of simplifying the runtime, as it can immediately determine whether a character in the source code is a keyword or text, and also means that keywords are never entered directly, meaning that one can, for instance, have a variable named "PRINT", as the system can determine that it is not the same as the keyword.
As the systems evolved and added new keywords, the entry system became increasingly difficult to use. 48 BASIC in the Spectrum required every key to host up to four keywords. Entering keywords was a time-consuming process of looking over the relatively small type on the keyboard for the appropriate key, and then correctly entering the multiple keystrokes needed to enter it properly. For instance, entering BEEP required one to type Script error: No such module "key". to access extended mode (later models include a separate Script error: No such module "key". key), keeping Script error: No such module "key". held down, and then and pressing Script error: No such module "key".. To improve the complex entry on the Spectrum, the keywords were colour-coded to indicate the required mode:Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
- White: key only
- Red on the key itself: Script error: No such module "key". plus the key
- Green above the key: Script error: No such module "key". followed by the key
- Red below the key: Script error: No such module "key". followed by Script error: No such module "key". plus the key
This concept had run its course, and later machines running 128 BASIC (ZX Spectrum 128, +2, +3, +2A, and +2B) featured a more traditional editor where the user typed-in the keyword as individual characters, similar to other home computers of the era. This required a new tokenizer to convert the line into a similar internal format.
The resulting in-memory storage of the program was otherwise similar to Microsoft BASIC, in that only the keywords are presented as tokens, while non-keywords – like string and numeric constants and variable names – are left in their original typed-in format. However, that typed-in format was not ASCII, but an internal character code that contains both printable characters and the keyword tokens. Although portions of the table, the capital letters A to Z, for instance, are in the same order as in ASCII, their characters correspond to different numeric values, i.e. their code points' offset from zero is different from ASCII's offset of 65. Other characters, like punctuation, may have been moved about even more. The ZX Spectrum character set is the most prominent example of such a character code. Related computers running Sinclair BASIC used similar variants, e.g. the ZX80 or ZX81 character sets. All of these different but related character sets included Sinclair BASIC tokens.
Data types
One uncommon feature of Sinclair BASIC is the way it stores variables in memory. Typically, interpreters use a fixed-size entry to hold data, making it easy to scan the variable table. Due to the extremely limited memory of the ZX series, any wasted space had to be avoided, and this led to the use of a variable-length format. The data types included numbers stored in a 5-byte values, strings with a length and then the characters, and arrays of both of those types. The data was stored in the table itself, which contrasts with most BASICs of the era, where strings and array entries were stored in a separate heap.
The first byte for a variable entry always held the type in the first three bits, and the first character of the name in the next five bits. As was the case in most microcomputer dialects, A, A$, A() and A$() were all different variables and could store different values. Most variables could only have a single-character name; the exception are numeric variables (not arrays), where an alternate format held the first character of the name in those same five bits, but was then followed by additional characters ending with one with its high-bit set. Long variable names were whitespace-independent, and case-insensitive in later versions, so LET Number Of Apples = 5 is the same as LET numberofapples = 5 referred to the same variable.
The downside to this approach is that scanning the table to look up the value of a variable reference is more complex. In addition to testing whether the name matches using the subset of the first byte, if the entry is not the one that is being looked for, the type has to be read from the upper three bits and then the next location of a variable in storage calculated using the type. For instance, if the program encounters the variable "A" and the table starts with the entry for "B$", it fails to match A with B, then reads the type to see it is a string, and then has to read the following length byte and skip forward by that amount of bytes to find the next entry in the table. To make this somewhat easier, arrays also stored a two-byte length, so the entire structure could be skipped over more easily.
A unique feature was the "short float", or integer type. Any numeric variable could store either type, the storage itself did not change and used 5 bytes in either case. Integers were indicated by setting the exponent byte to zero, while floating-point values were stored with an excess-128 format exponent. This meant that it could not store zero as a float and lost one possible exponent magnitude. It also did not use any less memory, as the values were still 5-byte in memory. The advantage to this format is performance; the math library included tests to look for the zero exponent, and if it was seen, it would not attempt to perform various operations on the remaining 3 bytes under certain conditions.
Keyword details
The ZX81 8K BASIC used the shorter forms GOTO, GOSUB, CONT and RAND, whereas the Spectrum 48 BASIC used the longer forms GO TO, GO SUB, CONTINUE and RANDOMIZE. The ZX80 4K BASIC also used these longer forms but differed by using the spelling RANDOMISE. The ZX81 8K BASIC was the only version to use FAST, SCROLL, SLOW and UNPLOT. The ZX80 4K BASIC had the exclusive function TL$(); it was equivalent to the string operator (2 TO ) in later versions.
Unique code points are assigned in the ZX80 character set, ZX81 character set and ZX Spectrum character set for each keyword or multi-character operator, i.e. <=, >=, <>, "" (tokenized on the ZX81 only), ** (replaced with ↑ on the Spectrum). These are expanded by referencing a token table in ROM. Thus, a keyword uses one byte of memory only, a significant saving over traditional letter-by-letter storage. This also meant that the BASIC interpreter could quickly determine any command or function by evaluating one byte, and that the keywords need not be reserved words like in other BASIC dialects or other programming languages, e.g., it is allowed to define a variable named PRINT and output its value with PRINT PRINT. This is also related to the syntax requirement that every line start with a command keyword, and pressing the one keypress for that command at the start of a line changes the editor from command mode to letter mode. Thus, variable assignment requires LET (i.e., LET A=1 not only A=1). This practice is also different from other BASIC dialects. Further, it meant that unlike other BASIC dialects, the interpreter needed no parentheses to identify functions; SIN x was sufficient, no SIN(x) needed (though the latter was allowed). The 4K BASIC ROM of the ZX80 had a short list of exceptions to this: the functions CHR$(), STR$(), TL$(), PEEK(), CODE(), RND(), USR() and ABS() did not have one-byte tokens but were typed in letter-by-letter and required the parentheses. They were listed as the INTEGRAL FUNCTIONS on a label above and to the right of the keyboard.[8]
128 BASIC, present on ZX Spectrum 128, +2, +3, +2A, and +2B, stored keywords internally in one-byte code points, but used a conventional letter-by-letter BASIC input system. It also introduced two new commands:
PLAY, which operated the 128k models' General Instrument AY-3-8910 music chipSPECTRUM, which switched the 128k Spectrum into a 48k Spectrum compatibility mode
The original Spanish ZX Spectrum 128 included four additional BASIC editor commands in Spanish,[9][10] one of which was undocumented:
EDITAR(to edit a line number or invoke the full screen string editor)NUMERO(to renumber the program lines)BORRAR(to delete program lines)ANCHO(to set the column width of the RS-232 device, but undocumented as the code was broken)
Unlike the LEFT$(), MID$() and RIGHT$() functions used in the ubiquitous Microsoft BASIC dialects for home computers, parts of strings in Sinclair BASIC are accessed by numeric range. For example, A$(5 TO 10) gives a substring starting with the 5th and ending with the 10th character of the variable a$. Thus, it is possible to replace the LEFT$() and RIGHT$() commands by simply omitting the left or right array position respectively; for example a$( TO 5) is equivalent to LEFT$(A$,5). Further, a$(5) alone is enough to replace MID$(A$,5,1).
Syntax
Keywords
On the 16K/48K ZX Spectrum (48 BASIC), there are 88 keywords in Sinclair BASIC, denoting commands (of which there are 50), functions and logical operators (31), and other keywords (16, including 9 which are also commands or functions):
| Keyword | Parameters[note 1] | Entered using[note 2] | Type | Summary |
|---|---|---|---|---|
ABS
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the absolute value of numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
ACS
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the arccosine of numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
AND
|
Script error: No such module "key". | Logical operator | Returns true if both conditions on either side of the AND keyword are true, else returns false[note 3]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
| |
ASN
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the arcsine of numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
AT
|
line, column;
|
Script error: No such module "key". | Other | Used in a PRINT statement to print at the line and column specified;Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. for example, PRINT AT 5,10;"*" puts a star in column 10 of line 5.
|
ATN
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the arctangent of numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
ATTR
|
(line, column)
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns a byte containing information on the colours of the text cell on the screen, corresponding to the specified line and column; note that, unlike most Sinclair BASIC keywords, the parentheses are required; the first three bits indicate the ink (foreground) colour, the fourth, fifth and sixth bits the paper (background) colour, the seventh bit whether the colours are bright or not, and the eight, whether they are flashingLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
BEEP
|
duration, pitch
|
Script error: No such module "key". then Script error: No such module "key". | Command | Produces sound from the computer's speaker; duration is in seconds, pitch is in semitones above (positive value) or below (negative value) middle CLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
BIN
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Other | Indicates number is in binary notationLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
BORDER
|
number
|
Script error: No such module "key". | Command | Sets the border of the screen to the colour specified by the number[note 4]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
BRIGHT
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Command/other | Makes all following colours brighter if number is 1, or its normal shade if 0[note 5]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
CAT
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Command | Displays contents of ZX Microdrive specified by number[note 6]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
CHR$
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the character corresponding to the decimal number in the computer's character setLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
CIRCLE
|
x, y, r
|
Script error: No such module "key". then Script error: No such module "key". | Command | Draws a circle with its centre at coordinates (x,y) and radius rLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
CLEAR
|
address
|
Script error: No such module "key". | Command | Clears the screen,Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. all variables and the GO SUB stack,[11] and optionally sets the maximum RAM address to be used by BASICLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
CLOSE #
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Command | Closes the specified stream number for access[note 6] |
CLS
|
Script error: No such module "key". | Command | Clears all text and graphics from the screenLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. | |
CODE
|
string
|
Script error: No such module "key". then Script error: No such module "key". | Function/other | Returns the number corresponding to the first character in string in the computer's character set;Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. also used to save arbitrary chunks memory to tape, disk, etc. and load them back in – see LOAD, SAVE and VERIFY for details
|
CONTINUE
|
Script error: No such module "key". | Command | Restarts a program after it has stopped due to an error or the user pressing the Script error: No such module "key". or Script error: No such module "key". keysLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. | |
COPY
|
Script error: No such module "key". | Command | Sends the currently displayed screen to the printerLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. | |
COS
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the cosine of numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
DATA
|
comma-separated values
|
Script error: No such module "key". then Script error: No such module "key". | Command/other | Provides numbers and/or strings to use with the READ commandLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. and allows saving the contents of an array to tape when used with the SAVE commandLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. (as SAVE filename DATA array name())
|
DEF FN
|
name(variable) = operation
|
Script error: No such module "key". then Script error: No such module "key". | Command | Defines a custom function that can be used with the FN command;function definitions must be of the form f(x)=operations, for example f(x)=x*2 and the function name may not consist of more than one letter, plus a $-symbol if the function returns a stringLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
DIM
|
variable(dimensions)
|
Script error: No such module "key". | Command | Declares an array with the specified dimensions, which may be multi-dimensional (for example, DIM a(10,10); if used with strings, the last dimension indicates the length of each of the strings (thus, DIM A$(2,5) is an array of two strings each of five characters long, and DIM B$(5) is one string of five characters)Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
DRAW
|
x, y [, r]
|
Script error: No such module "key". | Command | Draws a line in the current INK colour to coordinates (x,y) from the coordinates used by the previous PLOT or DRAW command; if the optional r is supplied, it indicates the angle of the circle segment to be drawn, in radiansLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
ERASE
|
drive;"filename"
|
Script error: No such module "key". then Script error: No such module "key". | Command | Deletes the specified file from a ZX Microdrive[note 6]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. |
EXP
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns e to the power numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
FLASH
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Command/other | Makes all following text alternate its foreground (INK) and background (PAPER) colours[note 5]
|
FN
|
function(value)
|
Script error: No such module "key". then Script error: No such module "key". | Function | Calls the function defined earlier in the program using DEF FNLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
FORMAT
|
drive;"name"
|
Script error: No such module "key". then Script error: No such module "key". | Command | Formats the cartridge in the indicated Microdrive and assigns it the identifier name[note 6]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
FOR
|
variable = start TO end
|
Script error: No such module "key". | Command | Starts a FOR-NEXT loop;Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. the variable name may only be one character longLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
GO SUB
|
number
|
Script error: No such module "key". | Command | Makes the program jump to the BASIC line specified by number; when the program encounters the command RETURN, it will jump back to the statement after the GO SUBLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
GO TO
|
number
|
Script error: No such module "key". | Command | Makes the program jump to the BASIC line specified by number
|
IF
|
condition THEN
|
Script error: No such module "key". | Command | Evaluates the condition, and if true, executes the statement that follows the keyword THEN that must come after the condition,Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. for example IF A=1 THEN LET B=2[note 7]
|
IN
|
address
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns a byte read from the hardware input/output port corresponding to the addressLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
INK
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Command/other | Sets the foreground colour for text and graphics[note 4][note 5]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. |
INKEY$
|
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns a string representing the key being pressed on the keyboard at the moment the function is called, or an empty string if none is,Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. but does not wait for a keypress |
INPUT
|
[prompt,] variable
|
Script error: No such module "key". | Command | Halts program execution until the user types in something on the keyboard and presses the Enter key, then stores the entered value in the specified variable; if the optional prompt is supplied, this will be shown on the screenLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
INT
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the integer value of number, rounding down to the nearest whole numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. (thus, INT -1.1 returns −2, not −1)
|
INVERSE
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Command/other | Reverses the colours on all following text if number is 1, so that it uses the current ink colour for the background and the current paper colour for the text, or sets them back to normal if number is 0[note 5]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
LEN
|
string
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the number of characters (bytes) in stringLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
LET
|
variable=value
|
Script error: No such module "key". | Command | Assigns value to the named variableLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
LINE
|
|
Script error: No such module "key". then Script error: No such module "key". | Other |
|
LIST
|
[number]
|
Script error: No such module "key". | Command | Outputs the current BASIC program to the screen; if the optional number is provided, it omits all lines with a lower numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
LLIST
|
[number]
|
Script error: No such module "key". then Script error: No such module "key". | Command | As LIST except the listing is output to the printerLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
LN
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the natural logarithm of numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
LOAD
|
"filename" DATA variable() | [CODE [start[, length]]] | SCREEN$
|
Script error: No such module "key". | Command | Loads from tape or another storage device, with the filename specified, or the first file found if an empty string ("") is provided.
|
LPRINT
|
text
|
Script error: No such module "key". then Script error: No such module "key". | Command | As PRINT except output is sent to the printerLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
MERGE
|
"[filename]"
|
Script error: No such module "key". then Script error: No such module "key". | Command | As LOAD, except it does not delete the current program and variables; if a line number exists in both, that of the newly loaded program overwrites the existing one. Using MERGE prevents a program saved using LINE from auto-running once loadedLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
MOVE
|
stream1 TO stream2
|
Script error: No such module "key". then Script error: No such module "key". | Command | Moves data from one stream (keyboard, screen, file, printer, network, etc.) to another[note 6]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. |
NEW
|
Script error: No such module "key". | Command | Erases the current BASIC program and all variablesLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. | |
NEXT
|
variable
|
Script error: No such module "key". | Command | Closes a FOR-NEXT loop; the variable must match that of the corresponding FOR commandLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. – "empty" NEXTs to refer to the immediately preceding FOR in the program are not allowed
|
NOT
|
condition
|
Script error: No such module "key". | Logical operator | Returns true if the condition is false, else returns false[note 3]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
OPEN #
|
stream
|
Script error: No such module "key". then Script error: No such module "key". | Command | Opens a stream for reading from and/or writing to[note 6]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. |
OR
|
Script error: No such module "key". | Logical operator | Returns true if either of the conditions on either side of the OR keyword are true, else returns false[note 3]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
| |
OUT
|
address, value
|
Script error: No such module "key". then Script error: No such module "key". | Command | Sends the value (a byte) to the hardware input/output port corresponding to the address.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
OVER
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Command/other | Will make following text overprint with an XOR operation what is already on the screen if number is 1, instead of erasing it, or erase it if number is 0[note 5]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
PAPER
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Command/other | Sets the background colour for text and graphics[note 4][note 5]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. |
PAUSE
|
delay
|
Script error: No such module "key". | Command | Halts program execution for the specified delay, in of a second in Europe or in North AmericaLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. (thus, PAUSE 50 halts for one second in Europe). Also continues after a key press.
|
PEEK
|
address
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns a byte representing the contents of the memory location pointed to by addressLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
PI
|
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the value of piLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. |
PLOT
|
x, y
|
Script error: No such module "key". | Command | Draws a pixel in the current INK colour on the screen at the coordinates (x,y)Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
POINT
|
(x,y)
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns 1 if the pixel pointed at graphical coordinates (x,y) is currently in the ink (foreground) colour, else returns 0Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
POKE
|
address, value
|
Script error: No such module "key". | Command | Sets the contents of address in RAM to valueLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
PRINT
|
[AT x,y;] text
|
Script error: No such module "key". | Command | Prints text (which must be one or more strings or numbers separated with semicolons) to the screen.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. If used with #0 or #1, it prints in the bottom two (input) lines of the screen; if used with AT, it prints at the specified text coordinates; otherwise, it prints either immediately following the output of any previous PRINT statement (if the previous statement ended in a semicolon), or in the first column of the line below the previous PRINT output,Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. defaulting to 0,0.
|
RANDOMIZE
|
[number]
|
Script error: No such module "key". | Command | Initializes the random number generator; if used without a number (or with 0), it does this based on the computer's internal clock, else it uses the number supplied, which must be in the range [1,65535]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
READ
|
variable
|
Script error: No such module "key". then Script error: No such module "key". | Command | Takes a value from a DATA statement and stores it in the named variable: the first time READ is used, it gets the first value after the first DATA, the second time it gets the next one, and so onLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
REM
|
text | Script error: No such module "key". | Command | Begins a comment in the source code, meaning that everything after the REM statement is ignored, until the end of the lineLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. – note this includes everything after a colon, which normally begins a new segment: 10 REM Nothing to see here: PRINT "Unprintable" will not produce any output, for example.
|
RESTORE
|
[number]
|
Script error: No such module "key". then Script error: No such module "key". | Command | Resets where READ commands look for values in DATA statements: if used without a number, the next READ will use the first DATA in the program, with a number it will use the first DATA on or after the line whose number is indicatedLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
RETURN
|
Script error: No such module "key". | Command | Returns execution to the first statement following the last GO SUB command that was executedLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
| |
RND
|
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns a pseudo-random number with eight significant figures in the range [0,1)Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. |
RUN
|
[number]
|
Script error: No such module "key". | Command | Starts the current BASIC program, from its first line if no number is specified, else from the line with that number (or the first one after, if it does not exist)Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
SAVE
|
"filename" [DATA variable() | LINE number | CODE start, length | SCREEN$]
|
Script error: No such module "key". | Command | Saves to tape or another storage device, with the filename specified.
|
SCREEN$
|
[(line, column)]
|
Script error: No such module "key". then Script error: No such module "key".+Script error: No such module "key". | Function/other | As a function, identifies the character at the specified line and column on the screen.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Used after the filename in a LOAD or SAVE command, indicates that the contents of the display memory should be loaded or saved; this essentially makes it a shortcut for CODE 16384,6912[note 8] but does not work with VERIFY because the contents of the display memory will be different by the time that command reads back the saved data;Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
SGN
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns 1 if number is positive, 0 if it is 0, and −1 if it is negativeLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
SIN
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the sine of numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
STEP
|
number
|
Script error: No such module "key". | Other | Indicates the interval used by a FOR statement,Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. for example FOR n=2 TO 6 STEP 2 will skip n=3 and n=5 in the loop
|
STOP
|
Script error: No such module "key". | Command | Ends execution of the current program, exiting to the BASIC editor; can also be given when the computer is waiting for input using the INPUT command;Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. once the program is stopped, it can be resumed with CONTINUE
| |
SQR
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the square root of numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
STR$
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Converts a number to string. |
TAB
|
column
|
Script error: No such module "key". then Script error: No such module "key". | Other | In a PRINT statement, makes sure that the text to be output begins in the column specified, wrapping to the next line as necessary, but never more than one lineLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
TAN
|
number
|
Script error: No such module "key". then Script error: No such module "key". | Function | Returns the tangent of numberLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
THEN
|
statement
|
Script error: No such module "key". | Other | Follows the condition in an IF statement to indicate what should happen when the condition evaluates to true[note 7]Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
TO
|
|
Script error: No such module "key". | Other | Indicates a range from the number to the left of TO to the number of the right of it, inclusive;Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. when used with FOR both numbers must be supplied, while if used to slice strings, either may be left off to indicate the start or end of the string
|
USR
|
string or address
|
Script error: No such module "key". then Script error: No such module "key". | Function | When called with a single-character string, this returns the memory address at which the glyph for the user-defined graphic character corresponding to that character is defined.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. If called with an address, it starts machine code execution at that address (thus making it one of the few Sinclair BASIC functions to have a Side effect) and returns the contents of the Z80’s BC register pair.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. |
VAL
|
string
|
Script error: No such module "key". then Script error: No such module "key". | Function | Evaluates the string as a number and returns the result;Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. this can perform calculations: VAL "1+2" returns 3, for example, and also evaluates variables and even other VAL statements: LET A=1: VAL "A+VAL ""2"""[note 9] also returns 3
|
VAL$
|
string
|
Script error: No such module "key". then Script error: No such module "key". | Function | Similar to VAL but evaluates the string as a stringLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
VERIFY
|
"[filename]"
|
Script error: No such module "key". then Script error: No such module "key". | Command | Reads a program or data from tape or other storage, much like LOAD, but instead of loading it into memory, compares it with the program or data that is already in memory. This is intended to be used immediately after a SAVE command, to make sure the program or data has been saved without corruption.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
|
Page Template:Multiple image/styles.css has no content.
Official versions
4K BASIC
4K BASIC for ZX80[12] (so named for residing in 4 KiB read-only memory (ROM)), was developed by John Grant of Nine Tiles for the ZX80. It has integer-only arithmetic.
- System commands:
NEWRUNLISTLOADSAVE - Control statements:
GOTOIFTHENGOSUBSTOPRETURNFORTONEXTCONTINUE - Input/output statements:
PRINTINPUT - Assignment statement:
LET - Other statements:
CLEARCLSDIMREMRANDOMIZEPOKE - Functions:
ABSCHR$CODEPEEKRNDSTR$TL$USR
8K BASIC
8K BASIC is the ZX81 BASIC (also available as an upgrade for the ZX80[2]), updated with floating-point arithmetic by Steve Vickers, so named for residing in 8 KiB ROM.
- Statements:
PRINTRANDLETCLEARRUNLISTGOTOCONTINPUTNEWREMPRINTSTOPBREAKIFSTOPFORNEXTTOSTEPSLOWFASTGOSUBRETURNSAVELOADCLSSCROLLPLOTUNPLOTPAUSELPRINTLLISTCOPYDIMPOKENEW - Functions:
ABSSGNSINCOSTANASNACSATNLNEXPSQRINTPIRNDFUNCTIONLENVALSTR$NOTCODECHR$INKEY$ATTABINKEY$PEEKUSR
48 BASIC
48 BASIC is the BASIC for the original 16/48 KB RAM ZX Spectrum (and clones), with colour and more peripherals added by Steve Vickers and John Grant. It resides in 16 KB ROM and began to be called 48 BASIC with the introduction of the ZX Spectrum 128 at which time the 16 KB Spectrum was no longer sold and most existing ones in use had been upgraded to 48 KB.[3]
128 BASIC
128 BASIC is the BASIC for the ZX Spectrum 128.[4] It offers extra commands and uses letter-by-letter input.
- New commands:
LOAD !SAVE !MERGE !ERASE !PLAYSPECTRUM
+3 BASIC
+3 BASIC is the BASIC with disk support for the ZX Spectrum +3 and +2A.[3]
- New commands:
FORMATCOPY
T/S 2000 BASIC
T/S 2000 BASIC is used on the Spectrum-compatible Timex Sinclair 2068 (T/S 2068) and adds the following six new keywords:
DELETEdeletes BASIC program line ranges.FREEis a function that gives the amount of free RAM.PRINT FREEwill show how much RAM is free.ON ERRis an error-handling function mostly used asON ERR GO TOorON ERR CONT.RESETcan be used to reset the behaviour ofON ERR. It was also intended to reset peripherals.SOUNDcontrols the AY-3-8192 sound chip.STICKis a function that gives the position of the internal joystick (Timex Sinclair 2090).
BASIC64
BASIC64 by Timex of Portugal, is a software extension[13] to allow better Basic programming with the 512×192 and dual display areas graphic modes available only on Timex Sinclair computers. This extension adds commands and does a complete memory remap to avoid the system overwriting the extended screen memory area. Two versions exist due to different memory maps – a version for TC 2048 and a version for T/S 2068 and TC 2068.
PRINT #prints to a specific output channel.LIST #lists the program to a specific output channel.CLS*clears both display areas.INK*sets ink colour for both display areasPAPER*sets paper colour both display areasSCREEN$selects the high / normal resolution modes.PLOT*plots a pixel and updates the drawing position.LINEdraws a line from the previous PLOT position, supporting arc drawingCIRCLE*draws a circle or oval, depending on screen mode.
Timex Extended Basic
Timex Extended Basic by Timex of Portugal is used on the Timex Computer 3256, adding TEC – Timex Extended Commands commands supporting the AY-3-8912 sound chip, RS-232 network and the 512x192 pixel high resolution graphic mode.[14][15]
- RAM drive commands:
LOAD!SAVE!CAT!MERGE!ERASE!CLEAR! - RS-232 commands:
FORMAT!LPRINTLLIST - AY-3-8912 commands:
BEEP! - 512 x 192 resolution commands:
SCREEN$DRAW!PLOT!CIRCLE!
Other versions, extensions, derivatives and successors
Interpreters for the ZX Spectrum family
Several ZX Spectrum interpreters exist.[16]
- Beta BASIC by Dr. Andy Wright, was originally a BASIC extension, but became a full interpreter.[17]
- YS MegaBasic by Mike Leaman.[16][18]
- ZebraOS by Zebra Systems in New York, a cartridge version of T/S 2000 BASIC that used the 512×192 screen mode.[19]
- Sea Change ROM by Steve Vickers and Ian Logan, modified by Geoff Wearmouth, a replacement ROM with an enhanced Sinclair BASIC.[20]
- Gosh Wonderful by Geoff Wearmouth, a replacement ROM that fixes bugs and adds a tokenizer, stream lister, delete and renumber commands.[16][21]
- OpenSE BASIC (formerly SE BASIC) by Andrew Owen, a replacement ROM with bug fixes and many enhancements including ULAplus[22] support, published as open source in 2011[23][24][25]
Compilers for the ZX Spectrum family
Several ZX Spectrum compilers exist.[16]
- HiSoft COLT Compiler (a.k.a. HiSoft COLT Integer Compiler)[26][27]
- HiSoft BASIC (a.k.a. HiSoft BASIC Compiler), an integer and floating-point capable compiler[28][29]
- Laser Compiler[30][31]
- Softek 'IS' Integer Compiler[32][33] (successor to Softek Integer Compiler[34])
- Softek 'FP' Full Compiler[35][36]
- ZIP Compiler[37][38]
Derivatives and successors for other computers
- SuperBASIC, a much more advanced BASIC dialect introduced with the Sinclair QL personal computer, with some similarities to the earlier Sinclair BASICs[39]
- SAM Basic, the BASIC on the SAM Coupé, generally considered a ZX Spectrum clone[40]
- ROMU6 by Cesar and Juan Hernandez – MSX[16]
- Spectrum 48 by Whitby Computers – Commodore 64[16]
- Sparky eSinclair BASIC by Richard Kelsh, an operating system loosely based on ZX Spectrum BASIC – Zilog eZ80[41]
- Sinbas by Pavel Napravnik – MS-DOS[16]
- Basic[42] (and CheckBasic[43]) by Philip Kendall – Unix
- BINSIC[44] by Adrian McMenamin, a reimplementation in Groovy closely modelled on ZX81 BASIC – Java
- BASin[45] by Paul Dunn, a complete Sinclair BASIC integrated development environment (IDE) based on a ZX Spectrum emulator[16] – Windows
- SpecBAS[46] (a.k.a. SpecOS) by Paul Dunn, an integrated development environment (IDE) providing an enhanced superset of Sinclair BASIC – Windows, Linux, Pandora, and Raspberry Pi
- ZX-Basic[47] – Backwardly compatible, but enhanced compiler of Sinclair BASIC programs the ZX Spectrum, written in Python, freely available for Windows, Linux and Mac OS
- ZX-Basicus[48] by Juan-Antonio Fernández-Madrigal, a synthesizer, analyzer, optimizer, interpreter and debugger of Sinclair BASIC 48K for PCs, freely downloadable for Linux and Windows.
See also
- List of computer system emulators § Sinclair ZX80
- List of computer system emulators § Sinclair ZX81
- List of computer system emulators § Sinclair ZX Spectrum and clones
Notes
Page Template:Reflist/styles.css has no content.
- ^ Optional parameters are enclosed in [square brackets]
- ^ These assume the computer is in K (keyword) mode, which it normally is at the start of a line when entering BASIC. On the Spectrum 16K and 48K, Extended Mode is entered by pressing Script error: No such module "key". and Script error: No such module "key". simultaneously rather than the Script error: No such module "key". key that is present on the Spectrum+ and later models.
- ^ a b c "False" in Sinclair BASIC equates to 0 (zero), everything else equates to "true". Functions that return true-or-false values thus actually return 0 for false and 1 for true, while
ANDusually returns the first of the conditions supplied for true, or 1 if no numerical values were given. For example,6 AND 7returns 6, whileNOT 6=7returns 1. - ^ a b c The available numbers for colours are:
1 2 3 4 5 6 7 0 blue red magenta green cyan yellow white black In all colour-related commands, the number 8 may be used to indicate "transparent" while in
INKandPAPERmay also be set to 9 for "contrast" – that is, to put a dark colour on a light background or vice versa automatically. - ^ a b c d e f
INK,PAPER,FLASH,BRIGHT,OVERandINVERSEset attributes for outputting text and graphics to the screen. They can be used either as commands, to apply to all subsequent output until set again, or within aPRINTstatement, to apply only from that point until the end of the statement. - ^ a b c d e f
CAT,ERASE,FORMATandMOVEwere originally designed to be used with peripherals, but at the launch of ZX Spectrum, they had not been completely implemented, such that their use generated an error message (Invalid Stream). Later with the aid of the ZX Interface 1 shadow ROM, they were used for the ZX Microdrive. (The shadow ROM was paged when the BASIC interpreter detected a syntax error, which is why most ZX Microdrive commands use a"*"). - ^ a b Unlike many other BASIC dialects, Sinclair Basic did not include the
ELSEoperator in theIF–THEN[–ELSE] clause. A workaround would be to use anIF–THEN–GO TOconstruct instead, bypassing the lines that would have been in anELSEclause with theGO TO - ^ The Spectrum’s display memory starts at address 16384 and is 6912 bytes long.
- ^ A string inside a string must have its quotes doubled in Sinclair BASIC.
References
- ^ Page Module:Citation/CS1/styles.css has no content.Garfield, Simon (28 February 2010). "Sir Clive Sinclair: "I don't use a computer at all"". The Guardian. Retrieved 23 May 2011.
He is keen to credit [...], not least Nine Tiles, the company that made the Basic operating software.
- ^ a b Page Module:Citation/CS1/styles.css has no content."ZX80 – 8K BASIC ROM Upgrade". www.fruitcake.plus.com.
- ^ a b c d Page Module:Citation/CS1/styles.css has no content."World of Spectrum - Documentation - ZX Spectrum +3 - Chapter 7". worldofspectrum.org.
- ^ a b c d Page Module:Citation/CS1/styles.css has no content."World of Spectrum - Documentation - ZX Spectrum 128 Manual Page 6". worldofspectrum.org.
- ^ Page Module:Citation/CS1/styles.css has no content.Smith, Tony (23 April 2012). "Happy 30th Birthday, Sinclair ZX Spectrum". The Register.
- ^ Page Module:Citation/CS1/styles.css has no content.Dunn, Paul (7 December 2022), SpecBAS, retrieved 12 December 2022
- ^ Page Module:Citation/CS1/styles.css has no content."CSDb". Commodore 64 Scene Database. Retrieved 12 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."Picture of ZX80".
- ^ Page Module:Citation/CS1/styles.css has no content."Spectrum 128 ROM Disassembly - Spanish Spectrum 128". www.fruitcake.plus.com.
- ^ Page Module:Citation/CS1/styles.css has no content.Sinclair (1985). ZX Spectrum 128 Introducción y Guía de Funcionamiento. Sinclair Research Ltd and Investronica, S. A. p. 9.
- ^ Page Module:Citation/CS1/styles.css has no content."World of Spectrum - Documentation - ZX Spectrum manual - Chapter 24". worldofspectrum.org.
- ^ Page Module:Citation/CS1/styles.css has no content."Sinclair ZX80 User Manual 4K Basic for ZX80".
- ^ Page Module:Citation/CS1/styles.css has no content."Timex tech info – Basic 64 for TC2048". timex.comboios.info.
- ^ Page Module:Citation/CS1/styles.css has no content."Microsete N.º46, Maio 1987" (PDF). loadzx.com.
- ^ Page Module:Citation/CS1/styles.css has no content."Timex Computer 3256, Timex Portugal". k1.spdns.de.
- ^ a b c d e f g h Page Module:Citation/CS1/styles.css has no content."Sinclair BASIC". World of Spectrum Classic. Retrieved 18 April 2025.
- ^ Page Module:Citation/CS1/styles.css has no content."Beta Basic at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."YS MegaBasic at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."Zebra OS64 at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."Sinclair BASIC history - Sinclair Wiki". sinclair.wiki.zxnet.co.uk.
- ^ Page Module:Citation/CS1/styles.css has no content."The Incomplete Spectrum ROM Assembly". Archived from the original on 1 September 2015.
- ^ Page Module:Citation/CS1/styles.css has no content."ULAplus". sites.google.com. Archived from the original on 25 May 2013. Retrieved 21 March 2016.
- ^ Page Module:Citation/CS1/styles.css has no content."ZX Interface 2 - SE BASIC (3rd Party ROM Cartridge)". www.fruitcake.plus.com. Archived from the original on 25 March 2015. Retrieved 23 March 2016.
- ^ Page Module:Citation/CS1/styles.css has no content."OpenSE BASIC". SourceForge. 16 April 2013.
- ^ Page Module:Citation/CS1/styles.css has no content."OpenSE BASIC at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."World of Spectrum - HiSoft COLT Compiler". World of Spectrum.
- ^ Page Module:Citation/CS1/styles.css has no content."HiSoft COLT Compiler at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."World of Spectrum - HiSoft BASIC". World of Spectrum.
- ^ Page Module:Citation/CS1/styles.css has no content."HiSoft BASIC at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."World of Spectrum - Laser Compiler". World of Spectrum.
- ^ Page Module:Citation/CS1/styles.css has no content."Laser Compiler at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."World of Spectrum - Softek 'IS' BASIC Compiler". World of Spectrum.
- ^ Page Module:Citation/CS1/styles.css has no content."Integer Compiler at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."World of Spectrum - Integer Compiler". World of Spectrum.
- ^ Page Module:Citation/CS1/styles.css has no content."World of Spectrum - Softek 'FP' Full Compiler". World of Spectrum.
- ^ Page Module:Citation/CS1/styles.css has no content."Softek 'FP' Full Compiler at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."World of Spectrum - ZIP Compiler". World of Spectrum.
- ^ Page Module:Citation/CS1/styles.css has no content."ZIP Compiler at Spectrum Computing - Sinclair ZX Spectrum games, software and hardware". Spectrum Computing. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content.Berry, Stephen (1984). "QL Keywords". Archived from the original on 22 February 2017. Retrieved 27 June 2023.
- ^ Page Module:Citation/CS1/styles.css has no content."Sam Coupe Scrapbook: Sam BASIC". www.mono.org. Retrieved 13 December 2022.
- ^ Page Module:Citation/CS1/styles.css has no content."Sparky eZX BASIC Project". rk-internet.com.
- ^ Page Module:Citation/CS1/styles.css has no content."Philip Kendall - Basic". www.shadowmagic.org.uk.
- ^ Page Module:Citation/CS1/styles.css has no content."Philip Kendall – CheckBasic". www.shadowmagic.org.uk.
- ^ Page Module:Citation/CS1/styles.css has no content."Binsic Is Not Sinclair Instruction Code". 25 June 2012.
- ^ Page Module:Citation/CS1/styles.css has no content."ZX Spin and BASin - ULAplus". sites.google.com.
- ^ Page Module:Citation/CS1/styles.css has no content."ZXDunny/SpecBAS". 5 June 2021 – via GitHub.
- ^ Page Module:Citation/CS1/styles.css has no content."ZX-Basic: Backwardly compatible, but enhanced compiler of Sinclair BASIC programs".
- ^ Page Module:Citation/CS1/styles.css has no content."ZX-Basicus: analyzer/synthesizer/optimizer/interpreter of Sinclair BASIC programs for the ZX Spectrum 48K". jafma.net.
Bibliography
- Page Module:Citation/CS1/styles.css has no content.Adamson, Ian; Kennedy, Richard (1986). Sinclair and the 'sunrise' Technology. Penguin.
- Page Module:Citation/CS1/styles.css has no content.Ardley, Neil (1984). Sinclair ZX Spectrum+ User Guide. Dorling Kindersley in association with Sinclair Research. ISBN 0-86318-080-9.
- Page Module:Citation/CS1/styles.css has no content.Vickers, Steven (1982). Sinclair ZX Spectrum BASIC Programming. Sinclair Research.
- Page Module:Citation/CS1/styles.css has no content.Vickers, Steven (1983). Sinclair ZX Spectrum BASIC Programming (2 ed.). Sinclair Research.
- Page Module:Citation/CS1/styles.css has no content.Cambridge Communication (1983). Sinclair ZX Spectrum Microdrive and Interface 1 manual. Sinclair Research.
External links
- Sinclair ZX Spectrum BASIC Programming: The original 1982 manual by Steven Vickers (referenced above)
- Sinclair ZX81 Basic Programming Script error: No such module "webarchive".: also by Vickers
- The History of Sinclair BASIC: By Andrew Owen
- Timex Computer World: Basic 64 user manual for Timex Computer 2048
- Sinclair BASIC grammar: A LL(1) grammar specification for parsing Sinclair BASIC 16/48K
Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found.