2026.06.8., 22:10
 
Láng Attila D.

The BASIC Dictionary

2025

Private publication
© Láng Attila D., 2025
ISBN

Foreword


This book is a dictionary of the BASIC language, the programming language that played a crucial role in the spread of home computers in the 1970s and 1980s, and still today plays a role in computer programming.
The original BASIC language, developed by John G. Kemeny and Thomas E. Kurtz on Dartmouth College in 1965, was a product of its period. It lacked methods of structured programming, these being unknown yet, and didn’t know anything about graphics and sound, since they were using teletypes which were printing on paper instead of monitors.
Later, BASIC became more and more famous, and more and more manufacturers applied it in their computers. But since these machines were more advanced than the teletypes, and there were more advancements invented in programming, they needed to enhance the language. There was no standard for doing this, each developer chose their own methods. Compatibility was out of question yet. Therefore, BASIC got a lot of dialects that are very different, especially in certain areas like structured programming, graphics and sound handling. Actually, there are languages which can be considered BASIC dialects, but it’s ambiguous.
The aim of this dictionary is to collect as many dialects of BASIC as possible, and to present them in a comprehensive format that provides a good overview on the most important element of BASIC language: the keywords.

The Keywords


BASIC is organized around keywords. A BASIC program is built up from statements, and a statement always begins with a keyword (however, one of them regularly can be omitted, but implied). Some statements use more keywords.
Keywords are viewed by home computer programmers like Lego bricks for builders. Especially in the home computer world, programmers knew all keywords, including their syntaxes and all special tidbits of use, on their specific type of computer.
Therefore, this dictionary is based upon keywords. Each keyword has a dictionary entry, listing all the details known about that keyword in the BASIC dialects included.

BASIC Dialects Included


Commodore 64 (Microsoft BASIC 2.0)
Commodore Plus/4, 16, 116 (Microsoft BASIC 3.5)
Commodore 128 (Microsoft BASIC 7.0)
Enterprise
Simons’ BASIC
Sinclair ZX81
Sinclair ZX Spectrum

Computer Descriptions


Commodore 64


“The Commodore 64, also known as the C64, is an 8-bit home computer introduced in January 1982 by Commodore International (first shown at the Consumer Electronics Show, January 7–10, 1982, in Las Vegas). It has been listed in the Guinness World Records as the highest-selling single computer model of all time, with independent estimates placing the number sold between 12.5 and 17 million units. Volume production started in early 1982, marketing in August for US$595 (equivalent to $1,880 in 2023). Preceded by the VIC-20 and Commodore PET, the C64 took its name from its 64 kilobytes (65,536 bytes) of RAM. With support for multicolor sprites and a custom chip for waveform generation, the C64 could create superior visuals and audio compared to systems without such custom hardware.” (Wikipedia)

The C64 isn’t featured for any keyword. I mean, there is no keyword tagged as C64, there are only ones tagged Commodore, Plus/4 and C128. Those listed as Commodore will work on the C64, but they will also work on later Commodore computers, the Plus/4 family and the C128, as well as on earlier Commodore computers like the PET and the VIC20.
Plus/4 and C128, however, received an extended version of C64’s simple BASIC dialect – too simple, in fact, since there is no BASIC support for many features of the computer.

Hardware

In the following, italics is used for features that cannot be reached from BASIC, only by memory manipulations.
64 KB memory, of which 38 is available for BASIC. 16 colors for all of the graphics detailed below.
Character screen: 25 rows, 40 characters. Redesignable characters. Multicolor character mode. Extended background mode.
High resolution graphics: 320 · 200 pixels with a foreground color changeable separately by character position (40 · 25 ones, 8 · 8 pixels each) and a single background color for the whole screen. Multicolor graphics: 160 · 200 pixels with two foreground and two background colors.
Sprite graphics: 8 sprites at the same time, each one set separately to 24 · 21 pixels (high resolution) or 12 · 21 pixels (multicolor). They can be shown single or double size in either or both horizontally or vertically. They can appear at any position of the screen, independent of its contents and mode (character screen, high resolution or multicolor graphics), including edge positions where they aren’t visible in whole.
Sound: 3 independent voices, 4 waveform for each. 3 amplitude modulators. 3 envelope generators with attack, decay, sustain and release values. Oscillator synchronization and ring modulation. Programmable filter. Volume setting.
Peripherals: keyboard (part of the computer), TV or monitor, cassette tape, floppy drive, printer, joystick, paddle and a lot more. Most important devices were manufactured by Commodore itself.

Commodore Plus/4, 16, 116


“The Commodore 16 is a home computer made by Commodore International with a 6502-compatible 7501 or 8501 CPU, released in 1984 and intended to be an entry-level computer to replace the VIC-20. A cost-reduced version, the Commodore 116, was mostly sold in Europe.
The C16 and C116 belong to the same family as the higher-end Plus/4 and are internally very similar  to it (albeit with less RAM – 16 KB rather than 64 KB – and lacking the Plus/4’s user port and Three-Plus-One software). Software is generally compatible among all three provided it can fit within the C16’s smaller RAM and does not utilize the user port on the Plus/4.
While the C16 was a failure on the US market, it enjoyed some success in certain European countries and Mexico.” (Wikipedia)

This computer family is tagged as Plus/4 in the book. Keywords tagged as Commodore also work on them. Their BASIC 3.5 dialect is identical, an extended version of BASIC 2.0 of the C64. The only difference is the keyboard, and that Plus/ has got a built-in piece of software called Three-Plus-One, which has gained practically zero popularity.

Differences from C64:
121 colors instead of 8. (16 colors in 8 shades, but all shades of black are identical.)
Character screen: no multicolor or extended background mode.
Graphic screen: for both high resolution and multicolor, there is an additional mode when the bottom five rows of the character screen are visible at the bottom of the screen, covering the graphic screen.
Sprites don’t exist.
Sound: a much simpler sound chip which has 2 voices, of which one can emit white noise.
Unlike the C64, there are dedicated BASIC keywords for all graphic and sound features.

Commodore 128


“The C128 is a significantly expanded successor to the C64, with nearly full compatibility. It is housed in a redesigned case with an improved keyboard including a numeric keypad and function keys. Memory was enlarged to 128 KB of RAM in two 64 KB banks. A separate graphics chip provided 80-column color video output in addition to the original C64 modes. It also included a Zilog Z80 CPU which allows the C128 to run CP/M, as an alternative to the usual Commodore BASIC environment. The huge CP/M software library, coupled with the C64’s software library, gave the C128 one of the broadest ranges of available software among its competitors.” (Wikipedia)

The C128 can work in C64 mode when it is basically the same as the C64, or in C128 when it runs BASIC 7.0, a highly advanced BASIC dialect which includes all the keywords from BASIC 3.5 and additional ones for the greater hardware possibilities of the C64, which are all built in the C128, too. Keywords tagged as Commodore or Plus/4 also work on it.

Enterprise


“The Enterprise is a Zilog Z80-based home computer announced in 1983, but due to a series of delays, was not commercially available until 1985. It was developed by British company Intelligent Software and marketed by Enterprise Computers.

The specification as released was powerful and one of the higher end in its class (though not by the margin envisaged in 1983). This was due to the use of custom ASICs for graphics and sound which took workload away from the CPU, an extensive implementation of ANSI BASIC and a bank switching system to allow for larger amounts of RAM than the Z80 natively supported. It also featured a distinctive and colourful case design, and promise of multiple expansion options. Its two variants are the Enterprise 64, with 64 KB of RAM, and the Enterprise 128, with 128 KB of RAM.

The machine was renamed several times during development, being known variously as Samurai, Oscar and Elan. Versions can sometimes been found in magazine articles referred to by the preceding monikers. Ultimately, not assisted by release delays and a changing market place, the Enterprise was not commercially successful. The manufacturer called in the receivers in 1986 with significant debt, although old stock continued to be sold through a German partner until well into the 1990s.” (Wikipedia)

The Enterprise has an excellent BASIC, but it is almost forgotten. A greater fandom has been built in Hungary.

Simons’ BASIC


“Simons’ BASIC is an extension to BASIC 2.0 for the Commodore 64 home computer. Written by British programmer David Simons in 1983, who was 16 years old at the time, it was distributed by Commodore as a cartridge.” (Wikipedia)

This software adds many keywords to the aforementioned simple BASIC 2.0, including graphics, sound, structured programming, peripherals etc.

Sinclair ZX81


“The ZX81 is a home computer that was produced by Sinclair Research and manufactured in Dundee, Scotland, by Timex Corporation. It was launched in the United Kingdom in March 1981 as the successor to Sinclair’s ZX80 and designed to be a low-cost introduction to home computing for the general public.
[…]
The ZX81 was designed to be small, simple, and above all, inexpensive, with as few components as possible. Video output was designed for a television set rather than a dedicated monitor. Programs and data are loaded and saved onto compact audio cassettes. It uses only four silicon chips and 1 KB of memory.” (Wikipedia)

The ZX81 has got one of the most simple BASIC dialects. The tag Sinclair refers to both ZX81 and Spectrum.

Order of Precedence

( )
functions except NOT and unary
**
unary
* /
+ binary
< = > <= >= <>
NOT
AND
OR

Limitations

Maximum line number allowed is 9999.
Each program line can contain only one statement. No : statement separator.
Numeric variables can have a name of any length.
String variables can have a single-letter name only, and a $ sign.
Arrays can have a single-letter name only, and a $ sign if string arrays.
An array cannot share its name with a scalar variable.
Loop variables used in FORNEXT can have a single-letter name only.
Numbers are stored to an accuracy of 9 or 10 digits.
Number precision is between 10³⁸ and 4*10⁻³⁹.
The screen has 24 lines with 32 character positions.
Program lines can be very long.
The contents of string variables can be very long.
Arguments of functions aren’t required to be enclosed in ( ) parentheses if the argument is one single literal or variable.

Sinclair ZX Spectrum


“The ZX Spectrum is an 8-bit home computer developed and marketed by Sinclair Research. One of the most influential computers ever made and one of the all-time bestselling British computers, over five million units were sold. It was released in the United Kingdom on 23 April 1982, and around the world in the following years, most notably in Europe and the United States.” (Wikipedia)

The younger brother of the ZX81, the Spectrum has got a simple, but relatively advanced BASIC dialect. The tag Sinclair refers to both ZX81 and Spectrum.

Order of Precedence

( )
functions except NOT and unary

unary
* /
+ binary
< = > <= >= <>
NOT
AND

Limitations

Maximum line number allowed is 9999.
Numeric variables can have a name of any length.
String variables can have a single-letter name only, and a $ sign.
Arrays can have a single-letter name only, and a $ sign if string arrays.
In variable names, spaces and control characters are ignored and all letters converted to lowercase.
Loop variables used in FORNEXT can have a single-letter name only.
Numbers are stored to an accuracy of 9 or 10 digits.
Number precision is between 10³⁸ and 4*10⁻³⁹.
The screen has 24 lines with 32 character positions.
Program lines can be very long.
The contents of string variables can be very long.
Arguments of functions aren’t required to be enclosed in ( ) parentheses if the argument is one single literal or variable.

Concepts in Programming


(to be written:) dummy, expression, file, function, light pen, logical file number, paddle, peripheral, subroutine, type (variable)

array
A collection of values (numbers or strings), having a common name and a unique index for each one. An array can be one-dimensional: a series; two-dimensional: a table; three-dimensional: values arranged in a cube; and more. In BASIC, an array must be either numeric or string type, but not both.

argument
A numeric or string value a function can work with, specified after the name of the function. All BASIC functions have syntax rules telling how many arguments can they take and what can they be.

ASCII
American Standard Code for Information Interchange. A code table created in the 1960s to encode characters with numbers. Originally, ASCII was having 128 code points, numbered from 0 to 127; later this was extended till 255. Since this is the largest number that can be stored in a single byte, ASCII could not be extended further. Being this not enough, they invented Unicode.

auxiliary keyword
A keyword that plays some modifying role in a statement which was defined by another keyword. At other places, an auxiliary keyword may be a statement or function keyword, in the same dialect or in other dialects.

beam
On the Enterprise, this is the name of the graphic cursor.

binary numbers
A numbering system when each digit has a place value twice the one standing at its right. So, 1 means one, 10 means two, 100 means four and 1000 means eight. This system has only two digits, 0 and 1, which also correspond to false and true, respectively.

binary operator
An operator that stands between two operands and acts on them. (The term has nothing to do with binary numbers.) For example, in 2 + 2, the symbol + is a binary operator.

bit
The smallest unit of information. A bit can store a value of 0 or 1. 8 bits are collected together to a byte.

bitwise operation
An operation on numeric values that concerns to their bit representation. For example, logically, 3 AND 8 is true (–1 or 1, depending on the dialect) because both 3 and 8 are nonzero values. But bitwise, 3 AND 8 is 0, because the binary representation for 3 is 0011, the one for 8 is 1000, so there’s no bit which would be 1 for both.

byte
The smallest unit of memory directly accessible. A byte contains 8 bits and thus it can store an integer value from 0 to 255.

carriage return
A special control character (decimal 13 in ASCII) which used to be sent to teletype machines to mean “return the carriage”, i.e. send the printing head to the beginning of the line. After this, a line feed (LF) was sent. After the age of teletypes, many computers were using the CR only, but Windows is still using both (CR/LF), and Unix is using LF only.

cartridge
A small electronic device consisting of a circuit in a plastic casing. Some home computers had a connector reserved for a cartridge. Cartridges can contain software (for example, a single game) or add advanced functionality.

cassette tape recorder
Or magnetophone, a simple electronic device in general use from the 1960s for storing music. Most home computers applied the same cassettes and same recorders as household music recordings.

character
An entity encoded by a special table (the ASCII table) to serve as part of strings. On home computers, every character is encoded with one byte, thus there may be 256 different characters existing at the same time. With Unicode, more bytes are used for a character, so the system can display a much greater variety of them.
Types of characters include printable and non-printable characters. Printable characters are letters, digits, punctuation and special symbols, and graphic characters. Non-printable characters are control characters which, when printed, change something on the screen, e.g. clear it, switch to a different color, move the cursor etc.
On ZX81 and Spectrum, all keywords are treated as single characters and typed with one single keypress (plus one or two modifier keys).
On most computers, the shape of printable characters can be redesigned. The computer won’t notice the change (for instance, a keyword PRINT is still the same keyword even if you redraw all the five letters to different shapes, since it operates on codes, not shapes).

character screen
A screen mode when only characters can be displayed. There is an invisible grid on the screen, dividing it to a certain number of lines and to a certain number of character positions; both numbers are specific to each computer. In each character position, exactly one character may be displayed because there is a single byte of the memory assigned to each one, and if the contents of a byte is changed, the character will change, too. Since on home computers, characters are encoded with one byte, only 256 different characters may appear on the screen. If you redesign any character, all instances of it will change immediately.
Many home computers have no graphic screen, only a character screen. Others have both, in different modes. Spectrum has no character screen, only a graphic screen.

command
Similar to the statement, but isn’t part of a BASIC program. In dialects using line numbers, a command is entered without a line number, that’s how the interpreter knows it is a command. Some keywords can be used only in command mode, others only in statement mode, and most of them in both modes.

compatible
Two computers are compatible if both can run the same programs. A peripheral is compatible with a computer if it can work with it.

compiler
A program created to make the computer to understand BASIC language. All keywords and their syntaxes were defined when the creator wrote the compiler. A compiler differs from an interpreter in its working mode: the compiler reads the complete BASIC code and translates it to machine code. Execution can take place only after this. Compiling takes time, but furthermore, the compiler isn’t necessary to run the program. BASIC compilers rarely appeared for home computers, they were mostly using interpreters.

concatenation
Appending a string to another one. For example, by concatenating strings "BA" and "SIC" you will get "BASIC". In BASIC, the concatenation is marked by the + symbol, the same one as for numeric addition.

constant
A value that cannot be changed in the run of the program. Constants are both literal constants which are written directly in the program, and named constants which are created similar to a variable, but their values cannot be changed later. Most home computer BASIC dialects don’t know named constants.

CR
Carriage return.

cursor
A marker on the screen which shows where will the next character be displayed. On different computers, it could be a flashing or non-flashing square, a horizontal line or a vertical line. When the computer is working on its own and we aren’t typing, the cursor is usually not visible, but it is there.
On Sinclair, the cursor is an inverted letter which show what mode is the keyboard in. Depending on the mode, the same key types different characters.

decimal numbers
The numbering system we are using in everyday life. Here, 10 means ten (ten times one), 100 means a hundred (a hundred times one) and so on. In programming, other systems are frequently used: hexadecimal, binary and sometimes octal, too.

degrees
The best known way to measure angles, used in everyday life. A right angle is 90 degrees, a complete circle is 360 degrees. Computers often use radians instead.

device
Enterprise uses several channels to communicate with devices. Channels are numbered 0 to 254, while devices have names. Default channels are:
0 – command input and normal text output, connected to device "EDITOR:", itself using devices "KEYBOARD:" and "VIDEO:".
1 to 100 – available for the user.
Channels 101 to 105 are automatically open until explicitly closed.
101 – graphics input and output.
102 – standard text page.
103 – standard sound output, connected to device "SOUND:".
104 – connected to device "PRINTER:".
105 – connected to device "KEYBOARD:".
106 – file-based input and output. Connected to device "DISK–1:" if available; if not, connected to device "TAPE:". Additional disk drives are "DISK–2:" and so on. Additional tape drives are similarly numbered.
107 – for network operations. Device "NET–0:" is the general channel, for broadcasting for all machines and for receiving data without specifying the source machine. Devices "NET–1:" to "NET–32:" are for specific machines. "SERIAL:" is a serial port.

device number
Commodore
There is a number to identify which peripheral do you want to communicate with. These are used in the OPEN statement:
0 = keyboard
1 = cassette tape; secondary address: 0 = input, 1 = output, 2 = output, writing an end of tape mark after CLOSE
2 = modem
3 = screen
4 and 5 = printer; secondary address: 0 = uppercase/graphic characters, 1 = lowercase/uppercase characters
8 to 11 = floppy drive; secondary address: 0 = save, 1 = load, 2 to 14 = data channels, 15 = command channel

dialect
BASIC is a programming language which is distributed by many companies for many computers. Based on both the different abilities of different computers and the personal taste of manufacturers, they can be very different: both the set of available keywords and their syntaxes may differ. Additionally, there are extensions for some dialects which add or modify keywords, thus are considered separate dialects.

dummy
A meaningless parameter or argument, required only by syntax but not used.

execution
When a program is running, its statements are executed one after another, as determined by the structure of the program.

expression
One or more values (literals and/or variables), connected by operators, forming a mathematical formula or a string processing formula.

floppy disk
A mass storage media largely used in the 1980s and 1990s. A floppy (flexible) plastic circle with a magnetic layer, enclosed in a square plastic envelope.

floppy drive
A device used for reading and writing floppy disks. Among them, a special category is the Commodore floppy drives which are programmable computers with an own language.

graphic cursor
An invisible cursor for the graphic screen which points to a pixel where the next graphic operation will draw to if no coordinates are given.

graphic screen
A screen mode where graphic shapes can be displayed. For home computers, graphic screens were memory consuming and slow, but the only way to freely (or relatively freely) draw on the screen. The graphic abilities of these computers were very diverse, and seen by our time, very low-key: low resolution, few colors.
Many home computers have no graphic screen at all. On the other hand, the Spectrum has only a graphic screen.

hard disk, hard drive
The most frequent mass storage device of our time. But for home computers, it was barely known and almost never used. Most home computers used cassette tape recorders and some of them floppy disks, too.

hexadecimal numbers
A numbering system frequently used in programming; actually, it’s a shorthand for binary numbers, used for better reading by humans. The system uses 16 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A (=10), B (=11), C (=12), D (=13), E (=14) and F (=15). Each digit has 16 times the place value than the one standing at its right: 10 means sixteen, 100 means two hundred and fifty-six, and 1000 means four thousand and ninety-six.

home computer
A category of computers being marketed from the end of the 1970s to the end of the 1980s. Relatively cheap, small computers with less knowledge than personal computers. Most of them had a small memory (those times, that was the most expensive part), a smaller selection of compatible peripherals, most of them used an household television instead of a monitor, and a household cassette tape recorder instead of a floppy drive or hard drive.

integer
A number with no fractional part (like 8). In most BASIC dialects, there are integer variables for storing only these numbers.

integer variable
A variable which can store only integer numbers. Storing a fractional value like 1.2 in an integer variable will result in 1, truncating the fractional part. In most BASIC dialects, these wear a % percent symbol as a suffix to their names. There are dialects which don’t know this type.

interpreter
A program created to make the computer to understand BASIC language. All keywords and their syntaxes were defined when the creator wrote the interpreter. An interpreter differs from a compiler in its working mode: the interpreter reads a statement, understands and executes it, then goes on to the next statement. Home computer BASIC dialects are written as interpreters.

inverse
Displaying characters a different way: the characters are shown in the color of the screen background, while the little squares encompassing each (see character screen) are colored to the character color. On many home computers, it’s the only method to add characters some emphasis.

keyword
A basic element in BASIC. A keyword is a single word (in this dictionary, some symbols are also treated as keywords). Its spelling is fixed and cannot be changed. Traditionally, keywords are written in ALL CAPS; the oldest computers didn’t have lowercase letters at all. On Sinclair computers, all keywords are treated like single characters (which appear as several characters, but each one encoded in one byte). Keywords identify statements, commands, functions, operators and others. Different BASIC dialects may use the same keyword for different purposes, or may use different keywords for the same purpose. Each keyword has one or more syntaxes, which also can be different in different BASIC dialects.

LF
Line feed.

line feed
A special control character (decimal 10 in ASCII) which used to be sent to teletype machines to mean “line feed”, i.e. to rotate the paper feeding cylinder one row further. This was sent after a carriage return. After the age of teletypes, many computers were using the CR only, but Windows is still using both (CR/LF), and Unix is using LF only.

line number
In older BASIC dialects, all lines of a program must begin with a number. This is both to separate them from commands (which have no number and are executed immediately) and to specify the order of execution. Traditionally, we are using numbers increasing by 10 (10, 20, 30 etc.), to make it easier to insert additional lines later.

literal
A numeric or string value directly written in a program line. Numeric literals are simply numbers. String literals are strings enclosed in " quotation marks.

logical value
A value that can either be true or false, nothing else. In BASIC, a numeric value of 0 represents false, and any non-zero value corresponds to true. If a logical operation returns a value of true, it is represented by –1 in most dialects, but in some dialects, 1.

logical operation
An operation on logical values. In most BASIC dialects, AND, NOT and OR are the available operations, but these keywords are often working as bitwise operations. In some dialects, also the XOR operation is available.

machine code
The native tongue of the processor. Not discussed in books dealing with BASIC language, since it’s a different language, but in some dialects, there are tools for working with machine code.

mass storage
A device that can store large amounts of information, in a way that it won’t be forgot upon switching the device off (what was a great problem with memories in 20th century computers). Mass storage devices are using some kind of data carrier media to write the actual data on. The earliest one was the punch card, then the punched tape (both made of paper and working with holes punched on them). Then came several kinds of plastic with a magnetic layer: the drum memory, the floppy disk and the hard disk. Later, the optical disks appeared, but the hard disks are still the most important mass storage media.

memory
An electronic device that can store information. Computers need memory to work. Since for a long period, memories were very expensive and forgot everything upon switching off, different types of mass storage were used.

modifier keyword
A Spectrum specialty. BRIGHT, FLASH, INK, INVERSE, OVER and PAPER can stand as statements on their own, thus affecting all subsequent graphic statements. Or they can appear inside graphic statements, even more of them in the same statement, thus affecting only that statement. Graphic statements that can be altered this way include CIRCLE, DRAW, INPUT, PLOT and PRINT.

name
In programming, we often need names. Variables, files, procedures (in some dialects), and other things are always reached by names. The names are chosen by the programmer. Each dialect has its own rules for what do they accept as a name. The most frequent rule is that a name must contain only letters and digits, and must begin with a letter.

numeric variable
A variable storing a number. In most BASIC dialects, numeric variables wear no symbol as a suffix to their names. Many dialects provide integer variables which can’t hold a fractional number, these have a suffix % (percent mark). Some dialects feature additional numeric variables, too.

octal numbers
A numbering system used in programming in the early period; later, it was replaced by hexadecimal numbers. Actually, a shorthand for binary numbers. The system uses only 8 digits, from 0 to 7. 10 means eight and 100 means sixty-four.

operand
A value (literal, variable or expression) that an operator is acting on.

operator
A symbol that can be used in expressions to act on values (literals, variables or partial expressions). These include fundamental arithmetic operations like + and , and others. BASIC has a lot less operators than mathematics.

option
An Enterprise specialty: a keyword representing a setting in the operating system and acting like a system variable. In this dictionary, option syntaxes are shown with the SET statement, or ASK when SET is not applicable.

order of precedence
When evaluating expressions, all BASIC dialects have a certain order of precedence between operators, similar to mathematics. Those listed first will be processed first (e.g. multiplication before addition). Operators of the same rank will be processed left to right.

parameter
A numeric or string value a statement can work with, specified after the name of the statement. All BASIC statements have syntax rules telling how many parameters can they take and what can they be.

peripheral
A device connected to the computer and serving for some purpose. There are input peripherals: keyboards, mice, joysticks, scanners etc.; output peripherals: monitors (TV), printers, audio devices.

personal computer
A category of computers marketed since the 1980s. Most computers used nowadays are personal computers.

pixel
The smallest unit of graphics that can be painted. The number of available pixels is called the graphic resolution and depends on the type of computer and the mode of graphic screen currently in effect.

program
A list of statements to be processed in order when needed. Programs can be very simple and minimal or large and complex.

program line
A line of text written on a computer, in a programming environment, according to the rules of some programming language (in this book: the BASIC language). In older versions of BASIC, program lines always began with a number which determined the order of execution, and served as reference for statements that acted on some program lines. Newer version omit line numbers, they’re using modern text editors instead, and the order of execution is simply determined by the physical order of the lines in the text.

radians
A way to measure angles, often used by computers. A full circle is 2π radians.

reserved variable
A variable which is reserved by BASIC for some special purpose. May be thought about as a function with no argument.

scalar variable
A non-array variable, which can contain only one numeric or string value at a time.

sprite
On C64 and C128, a sprite is a graphic shape which can appear independently to the contents of the screen. It works on both the character screen and the graphic screen. Its design is drawn by the programmer in two or four colors and it can move freely around. 8 sprites can be used.

statement
A basic element in BASIC. A statement can do some interaction with the screen, the keyboard or some peripheral; can make calculations using previously computed values; can change the order of processing program lines; can make decisions; and more. Each statement begins with a BASIC keyword (one of them can be omitted) which tells BASIC what to do and may contain parameters which tell BASIC how to do it. A statement is always part of a BASIC program, in a program line beginning with a line number (in those dialects that require line numbers). Most statements can appear with no line number as commands.

string
A series of characters kept together in a specified order. Literal strings are directly written in the program, enclosed in " quotation marks. Strings can be stored in string variables, too. The shortest string is the empty string: two quotation marks "" directly following each other, with nothing in between. The longest string allowed depends on the dialect.

string function
A function that operates on one or more strings. In a broader sense, any function that either or both takes a string as input or gives one as output is a string function. The narrower sense covers only those that give string output. These ones are wearing a $ dollar symbol as a suffix to their names.

string variable
A variable storing a string value. In most BASIC dialects, string variables wear a $ dollar symbol as a suffix to their names, and they’re strictly separated from numbers.

syntax
The grammar of BASIC language and of a given keyword. Programming languages, including BASIC, are a lot simpler than languages spoken by humans. They have only a few keywords, and each one has a syntax (or more syntaxes) which tells how does the interpreter understands them. The syntax must be followed rigorously, otherwise we will get an error message.

teletype
A machine looking like an electric typewriter: what you type was immediately appearing on paper. From the 1950s, they were used as the main I/O peripheral for computers: the user typed on the teletype which both printed on the paper and sent the messages to the computer, and it printed the answers on the paper, too. Screens (televisions, monitors) weren’t be used yet. That’s why displaying characters on the screen is still called printing. The teletypes disappeared in the 1970s.

UDG
Short for User Defined Graphics. A Spectrum specialty. There are 20 characters in the Spectrum character set which are easily redefinable.

unary operator
An operator that acts on a single operand. There are prefixed and postfixed unary operators, but most dialects of BASIC have only two unary operators, the for negative numbers, and NOT.

Unicode
The character encoding standard used nowadays. It can support millions of different characters. But home computers didn’t know it, they only knew ASCII.

variable
A storage area in the memory of the computer, marked by a name and serving to hold some information. There are numeric and string variables, scalar variables and arrays.

ASCII Tables


Commodore


The Commodore machines discussed in this book are using almost the same code tables. There are two, the ASCII table (in the modern literature: PETSCII) and the POKE code table. The ASCII table is used by ASC and CHR$, and internally for all character operations. It contains control characters, too. The POKE code table is used for storing information in the screen memory, and several screen related Simons statements are using it, too. It doesn’t contain control characters. When redesigning character shapes, we have to refer to the POKE code table.

Commodore ASCII Table

Where there are two characters listed, the left one is the uppercase/graphics character set, the right one is the lowercase/uppercase one. Where there is one character, it is the same for both.
ASCII codes are in decimal.
The structure of the codes:
0 to 31 – control characters
32 to 127 – printable characters
128 to 159 – control characters
160 to 255 – printable characters

0 to 1 unused
2 underline on (only on C128, 80 columns mode)
3 STOP
5 white
6 unused
7 bell (only on C128)
8 disable character set change; on C128: unused
9 enable character set change; on C128: TAB
10 only on C128: line feed
11 only on C128: enable character set change
12 only on C128: disable character set change
13 RETURN
14 lowercase/uppercase character set
15 on C128: flash on
16 unused
17 cursor down
18 reverse on
19 HOME
20 DEL
21 to 23 unused
24 only on C128: tab set/clear
25 to 26 unused
27 ESC (unused on Commodore 64)
28 red
29 cursor right
30 green
31 blue
32 space
33 !
34 "
35 #
36 $
37 %
38 &
39 .
40 (
41 )
42 *
43 +
44 ,
45 -
46 '
47 /
48 0
49 1
50 2
51 3
52 4
53 5
54 6
55 7
56 8
57 9
58 :
59 ;
60 <
61 =
62 >
63 ?
64 @
65 A
66 B
67 C
68 D
69 E
70 F
71 G
72 H
73 I
74 J
75 K
76 L
77 M
78 N
79 O
80 P
81 Q
82 R
83 S
84 T
85 U
86 V
87 W
88 X
89 Y
90 Z
91 [
92 £
93 ]
94 ^
95 ←
128 unused
129 orange; on C128: dark purple
130 on Plus/4: flash on; on C128: underline off
131 RUN
132 on Plus/4: flash off
133 F1
134 F3
135 F5
136 F7
137 F2
138 F4
139 F6
140 F8; on Plus/4: HELP
141 SHIFT+RETURN
142 uppercase/graphics character set
143 on C128: flash off
144 black
145 cursor up
146 reverse off
147 CLEAR
148 INST
149 brown; on C128, 80 columns mode: dark yellow
150 pink; on Plus/4: yellow-green
151 dark gray; on Plus/4: pink; on C128, 80 columns mode: dark cyan
152 medium gray; on Plus/4: blue-green
153 light green; on Plus/4: light blue
154 light blue; on Plus/4: dark blue
155 light gray; on Plus/4: light green
156 purple
157 cursor left
158 yellow
159 cyan

Color Tables


Commodore 64 and Commodore 128, 40 columns mode


1 = black
2 = white
3 = red
4 = cyan
5 = purple
6 = green
7 = blue
8 = yellow
9 = orange
10 = brown
11 = light red
12 = dark grey
13 = medium grey
14 = light green
15 = light blue
16 = light grey

Plus/4


All statements related to color handling use a colortype parameter, which can be one of the following:
0 = background color
1 = foreground color (on the graphic screen, it can be different in each character cell)
2 = multicolor 2 (on multicolor graphic screen only, can be different in each character cell)
3 = multicolor 3 (on multicolor graphic screen only, uniform on the whole screen)
4 = border (only in the COLOR statement)

C128


The colortype parameter is a little changed from the Plus/4:
0 = 40 column background
1 = 40 column foreground
2 = multicolor 1
3 = multicolor 2
4 = 40 column border
5 = 40 or 80 column characters
6 = 80 column background

In 80 column mode, the colors are:

1 = black
2 = white
3 = dark red
4 = light cyan
5 = light purple
6 = dark green
7 = dark blue
8 = light yellow
9 = dark purple
10 = dark yellow
11 = light red
12 = dark cyan
13 = medium grey
14 = light green
15 = light blue
16 = light grey

The Dictionary


ABS

function
all
ABS(x)
Returns the absolute value of x. The absolute value is the same value for non-negative numbers, and the appropriate positive value for negative ones.


ACCESS

auxiliary
Enterprise

An auxiliary keyword for OPEN.

ACOS

function
Enterprise
ACOS(x)
Returns the arc cosine of x

ACS

function
Sinclair
ACS x
Returns the arc sine of x. On ZX81, it appears as ARCCOS on the keyboard, but on the screen, it is ACS.


ALL

auxiliary
Enterprise

An auxiliary keyword for SAVE.

ALLOCATE

statement
Enterprise
ALLOCATE bytes
Reserves the given number of bytes for a machine code routine. Erases all variables.

AND

operator
all
x AND y
Returns the bitwise AND value of the operands.


ANGL

statement
Simons
ANGL x, y, angle, xr, yr, dmode
Draws a ray of a circle or ellipse. dmode in high resolution: 0 = erasing, 1 = drawing, 2 = inverting; in multicolor: 1–3 = the colors specified in MULTI and LOW COL statements, 4 = inverting (colors 3–0 instead of 0–3).

ANGLE

function
Enterprise
ANGLE(x, y)
The angle between the positive x-axis and the line between points 0, 0 to x, y.

APPEND

statement
C128
APPEND#lf, file$[, Ddev] [{ON|,} Uunit]
Opens a file$ to append, placing the pointer at the end of it.

ARC

statement
Simons
ARC x, y, begin, end, step, xr, yr, dmode
Draws an arc of a circle or ellipse from angle begin to end, in steps of step degrees. dmode: see ANGL.

ASC

function
all, except Sinclair and Enterprise
ASC(a$)
Returns the ASCII code of the first character of a$, according to the ASCII table of the given computer. Same as CODE.


ASK

statement
Enterprise
ASK {option|n} var
Puts the value of option to variable var. Specifying a number n instead will reach an operating system variable.

ASN

function
Sinclair
ASN x
Return the arc sine of x. On ZX81, it appears as ARCSIN on the keyboard, but on the screen, it is ASN. Same as ASIN.


ASIN

function
Enterprise
ASIN(x)
Returns the arc sine of x. Same as ASN.

AT

special_function auxiliary
Sinclair
AT row, column
Places the cursor at the given position of the screen. Can be used only in the PRINT and LPRINT statements; in the latter, the row number is ignored.
ZX81
row must be between 0 and 21, column must be between 0 and 31.
Simons
AT(column, row)
Enterprise
An auxiliary keyword for AUTO, DISPLAY, INPUT, LOOK and RENUMBER.


ATN

function
all
ATN(x)
Returns the arc tangent of x radians.
On ZX81, it appears as ARCTAN on the keyboard, but on the screen, it is ATN.


ATTR

function
Spectrum
ATTR(row, column)
Returns the attributes from the character position specified. It is a single byte, with bits meaning: 7 = FLASH, 6 = BRIGHT, 5–3 = PAPER, 2–0 = INK.


ATTRIBUTE

auxiliary
Enterprise

An auxiliary keyword for GRAPHICS.

ATTRIBUTES

option
Enterprise
SET ATTRIBUTES a
Sets a control flag in attribute video mode. a = 1 plotting in paper color, 2 without affecting bitmap data, 4 without affecting ink attributes, 8 without affecting paper attributes, 16, 32, 64 and 128 are the same as above but with printing.

AUTO

command
Plus/4
AUTO [step]
Turns automatic line numbering on (if step is present) or off (if step is omitted). When it’s on, entering a BASIC program line and pressing RETURN yields the next line number, the previous one plus step, be displayed.
Simons
AUTO first, step
first is the first number to be used.
Enterprise
AUTO [AT first] [STEP step]
Default first is 100, step is 10. Automatic numbering can be stopped by pressing STOP.


B

auxiliary symbol
C128

Auxiliary keyword for BLOAD, BSAVE.
Simons
A bit marking symbol for the @ statement.

BACKUP

statement
Plus/4
BACKUP Ddeva TO Ddevb [{ON|,} Uunit]
Copies a floppy disk from device deva to device devb on dual floppy drive unit. Cannot be used on single floppy drives.


BANK

statement
C128
BANK bank
Activates the selected memory configuration. bank means:
0–3 RAM only, 0 to 3
4–7 internal ROM with RAM 0 to 3
8–11 external ROM with RAM 0 to 3
12 kernal and internal ROM, RAM 0
13 kernal and external ROM, RAM 0
14 kernal and BASIC ROM, RAM 0, character ROM
15 kernal and BASIC ROM, RAM 0

BCKGNDS

statement
Simons
BCKGNDS gr, a, b, c
Switches to extended background color mode. gr is the background color, a, b and c are the background colors for Shifted, inverted and inverted Shifted characters, respectively.

BEAM

option
Enterprise
SET [£chan:] BEAM {ON|OFF}
When the beam is moved, it will leave a line behind it if it’s ON.

BEEP

statement
Spectrum
BEEP length, pitch
Sounds a note for length seconds at a pitch pitch semitones above (or below if it’s negative) the middle c.


BEGIN

statement
C128
BEGIN
Allows several lines to be included in an IFTHENELSE structure:
IF condition THEN BEGIN: statement

BEND: ELSE BEGIN

BEND

BEND

statement
C128
BEND
Closes a BEGIN clause (see there).

BFLASH

statement
Simons
BFLASH speed[, a, b]
Starts flashing the border between colors a and b, with speed 1 = slowest, 255 = fastest, or 0 = turns it off (then colors aren’t needed).

BIAS

option
Enterprise
SET [£chan:] BIAS c
Establishes which group of colors will figure as numbers 8–15 within the palette. c is the standard code number of any color within the group, 0 to 31, or an RGB function. The bias is applied to every palette.

BIN

special_function function
Spectrum
BIN number
Allows numbers to be entered in binary. number can be a binary constant only. Largest number allowed is 16 digits (1111111111111111 = decimal 65535).
Enterprise
BIN(number)


BLACK

reserved_constant
Enterprise
BLACK
The color black = RGB(0, 0, 0).

BLOAD

statement
C128
BLOAD file$[, Ddev][, Uunit][, Bbank][, Paddr]
Loads a binary file to the memory in the given bank, from the address addr.

BLOCK

statement
Simons
BLOCK x1, y1, x2, y2, dmode
Draws a filled rectangle. dmode: see ANGL.

BLUE

reserved_constant
Enterprise
BLUE
The color blue = RGB(0, 0, 1).

BOOT

statement
C128
BOOT file$[, Ddev][{ON|,} Uunit]
Loads and executes a binary file.

BORDER

statement option
Spectrum
BORDER c
Sets the color of the border, and also the paper color of the lower part of the screen (where BASIC lines are entered).
Enterprise
SET [£chan:] BORDER c


BOX

statement
Plus/4
BOX [colortype], x1, y1, x2, y2[, angle[, fill]]
Draws a rectangle with colortype from x1, y1 to x2, y2. It is rotated by angle radians. If fill is 1, it is filled.


BRIGHT

statement modifier
Spectrum
BRIGHT b
Sets the brightness for graphic statements. b 0 = normal, 1 = bright, 8 = transparent. Can be used as a statement or a modifier for graphic statements.


BSAVE

statement
C128
BSAVE file$[, Ddev][, Uunit][, Bbank], Paddr TO Pend
Saves a binary file from the memory in the given bank, from the address addr to address end.

BUMP

function
C128
BUMP(n)
Returns a byte containing the numbers of sprites that collided since the previous BUMP. n 1 = sprites collided with each other, 2 = sprites collided with the contents of the screen. The returned value is 1 on each bit (sprites 0 to 7).

C

symbol
Simons

A bit marking symbol for the @ statement.

CALL

statement
Simons
CALL label
Jumps to the line marked with PROC label. Can’t be followed by another statement in the same line.
Enterprise
CALL function[(parameters)]
Calls a built-in or user DEFined function. Any result is ignored.

CAPTURE

statement
Enterprise
CAPTURE FROM £ch1 TO £ch2
Captures input from channel ch1 and substitutes it for input expected from channel ch2.

CAT

statement
Spectrum
CAT   …NO INFO  
Accesses the catalog of the microdrive. Details unknown.


CATALOG

statement
C128
CATALOG [Ddev][{ON|,} Uunit][, joker$]
Same as DIRECTORY.

CAUSE

statement
Enterprise
CAUSE [EXCEPTION] ex
Causes an error by error code ex. The keyword EXCEPTION is optional.

CEIL

function
Enterprise
CEIL(x)
Gives the smallest whole number not less than x, so, rounds it up to the nearest whole number.

CENTRE

statement
Simons
CENTRE a$
Prints a$ centered in the line.

CGOTO

statement
Simons
CGOTO x
Calculated GOTO where x can be an expression.

CHAIN

statement
Enterprise
CHAIN {programnumber|programname (parameters)}
Executes another program, called by programnumber or programname, giving parameters to it.

CHAR

statement
Plus/4
CHAR [colortype], x, y[, a$[, invert]]
Prints a$ at position x, y (character coordinates) on either the character screen or the graphic screen, whichever is currently on. If invert is 1, it appears inverted.
Simons
CHAR x, y, code, dmode, size
Prints the character of POKE-code code on the graphic screen in size size. dmode: see ANGL.


CHARACTER

option
Enterprise
SET [£chan:] CHARACTER n, a, b, c, d, e, f, g, h, i
Defines the pattern of the character with ASCII code n, with numbers a to i defining each row of pixels as a byte. The change will affect all video pages. To return all characters to their default settings, use CLEAR FONT.

CHECK

function
Simons
CHECK({a, b|0})
If two numbers are given, it returns 0 if two sprites collided. If 0 is given, it returns 0 if a sprite collided with screen contents.

CHR$

function
all
CHR$(x)
Returns the character belonging to the ASCII code x,cording to the ASCII table of the given computer. x must be between 0 to 255, inclusively.


CIRCLE

statement
Plus/4
CIRCLE [colortype], [x, y], xr, [yr], [start], [end], [rot], [angle]
Draws a circle or ellipse with colortype, centered at x, y or at the graphic cursor if coordinates are omitted. xr and yr are the axis lengths. start and end are the two endpoints of an arc to be drawn. rot is the rotation. angle is the angle between two points being drawn: if it is 120, we get a triangle. (All angles are degrees.)
Spectrum
CIRCLE x, y, r
Draws a circle with radius r.
Simons
CIRCLE x, y, xr, yr, dmode
dmode: see ANGL.


CLEAR

statement
Sinclair
CLEAR
Clears all variables from the memory. Same as CLR.
Enterprise
CLEAR {£chan:|ENVELOPE|FKEYS|FONT|GRAPHICS|NET|QUEUE soundsource|SCREEN|SOUND|TEXT}
Clears or restores various options. CLEAR FKEYS restores function key definitions. CLEAR FONT default character shapes. CLEAR GRAPHICS clears the graphic screen, CLEAR TEXT the text screen, CLEAR SCREEN any screen. CLEAR ENVELOPE clears the sound envelope, CLEAR SOUND the sound, CLEAR QUEUE the specified soundsource. CLEAR NET the network. CLEAR £chan: clears a channel.


CLOSE

statement
Commodore
CLOSE lf
Closes the file or peripheral opened by the logical file number lf.
Enterprise
CLOSE £chan
Closes the channel, flushing and freeing the buffers.


CLOSE#

statement
Spectrum
CLOSE#   …NO INFO  
Closes a file on the microdrive. Details unknown.


CLR

statement auxiliary
Commodore
CLR
Clears all variables from the memory. Same as CLEAR. On Plus/4 and C128, also an auxiliary keyword for GRAPHIC.


CLS

statement
Sinclair
CLS
Clears the screen. Same as SCNCLR.


CMD

statement
Commodore
CMD lf[, message$]
Redirects all subsequent PRINT statements to the file or peripheral opened by logical file number lf. If message$ is present, it will be printed there.


CMOB

statement
Simons
CMOB b, d
For the statement @, defines the colors for the points marked B and D, respectively.

CODE

statement function auxiliary
Sinclair
CODE a$
Returns the ASCII code of the first character of a$, according to the ASCII table of the given computer. Same as ASC.
Also an auxiliary keyword for SAVE.
Enterprise
CODE [var]=string
Copies a string, assumed to contain machine code, to the position indicated by the current location counter. var can later be used to call the routine.


COLD

command
Simons
COLD
Restarts Simons’ BASIC.

COLLECT

statement
Plus/4
COLLECT [Ddev][{ON|,} Uunit]
Reorganizes the blocks on the floppy in device dev on unit unit.


COLLISION

statement
C128
COLLISION type[, line]
Turns on (if line is missing, turns off) the sprite collision interrupt. When it’s on, and a sprite collides, a GOSUB line is executed. type is 0 = sprite to sprite collision, 1 = sprite to background collision.

COLOR

statement
Plus/4
COLOR colortype, color[, luminosity]
Assigns colortype to the specified color and luminosity.
Enterprise
Keywords COLOR and COLOUR can be changed interchangeably. See details under COLOUR, CURSOR COLOUR and VIDEO COLOUR.


COLOUR

statement option
Simons
COLOUR border, background
Sets the border and background color.
Enterprise
SET [£chan:] COLOUR p, c
Sets the value of a color in the palette. p is the palette number, 0 to 7. c is the color code 0 to 255 or an RGB function. Keyword COLOR can be used instead of COLOUR.

CONCAT

statement
C128
CONCAT second$[, Ddeva] TO first$[, Devb][{ON|,} Uunit]
Appends file second$ to the end of file first$.

CONT

command
Commodore|ZX81
CONT
Continues the running program, after an error, a STOP statement or a user break. Same as CONTINUE.


CONTINUE

statement
Spectrum|Enterprise
CONTINUE
Continues the running program, after an error, a STOP statement or a user break. Same as CONT.
On the keyboard, it’s spelled CONT, but on the screen, it is CONTINUE.


COPY

statement
Plus/4
COPY [Ddeva,] [filea] TO [Ddevb,] [fileb] [{ON|,} Uunit]
Copies file filea to file fileb between devices deva and devb on unit unit. If filea is missing, all files are copied.
Sinclair
COPY
Makes a copy of the screen to the printer.
Simons
COPY
Makes a copy of the graphic screen to the printer.
Enterprise
COPY FROM £ch1 TO £ch2
Copies the contents of channel ch1 to channel ch2.


COS

function
all
COS(x)
Returns the cosine of x radians.


COSH

function
Enterprise
COS(x)
Returns the hyperbolic cosine of x.

COT

function
Enterprise
COT(x)
Returns the cotangent of x.

CSC

function
Enterprise
CSC(x)
Returns the cosecant of x.

CSET

statement
Simons
CSET x
x 0 = switch to uppercase mode, 1 = switch to lowercase mode, 2 = switch to the graphic screen used last.

CURSOR CHARACTER

option
Enterprise
SET [£chan:] CURSOR CHARACTER code
Specifies the ASCII code for a character to be used for the cursor.

CURSOR COLOUR

option
Enterprise
SET [£chan:] CURSOR COLOUR p
Specifies the palette number p to be used for the cursor. Keyword COLOR can be used instead of COLOUR.

CYAN

reserved_constant
Enterprise
CYAN
The color cyan = RGB(0, 1, 1).

D

auxiliary
Plus/4

Auxiliary keyword for APPEND, BACKUP, BLOAD, BOOT, BSAVE, CATALOG, COLLECT, CONCAT, COPY, DCLEAR, DIRECTORY, DLOAD, DOPEN, DVERIFY, HEADER, RENAME and SCRATCH.

DATA

statement auxiliary
all, except ZX81
DATA constant[, ]
Serves as a storage place of data which can be read later into variables. constants can be both numeric or string types, but when reading them, we must avoid trying to read a string data to a numeric variable, this would give an error.
String constants don’t need to be included in " quotation marks, except those that contain a , comma.
On Spectrum, also an auxiliary keyword for LOAD and SAVE.


DATE

statement
Enterprise
DATE date$
Sets the current date for the internal clock. date$ is in the format yyyymmdd.

DATE$

function
Enterprise
DATE$
Returns the current date in the format yyyymmdd.

DCLEAR

statement
C128
DCLEAR [Ddev][{ON|,} Uunit]
Closes all files and open channels on the drive.

DCLOSE

statement
C128
DCLOSE[#lf][{ON|,} Uunit]
Closes the file with logical file number lf, or all open files if it’s omitted, on the disk.

DEC

function
Plus/4
DEC(a$)
Converts a hexadecimal number between 0 and FFFF to decimal.

DEF

statement
Commodore
DEF FN name(variable)=expression
Defines a user function. The function can later be called as FNname(x) and will calculate the value of the expression with variable replaced by x. It is a symbolic argument. The argument, and therefore also x, must be numeric.
Spectrum
DEF FN name([variable[, ])=expression
The name and all variables are single-letter ones. DEF FN is a single keyword.
Enterprise
DEF name[(variable[, ])[=expression]
If =expression is present, it’s a single line function definition like on the previous systems. If it’s missing, calling the function name executes all subsequent lines till an END DEF line. Assigning a value to name will return the value from the function.
Functions can be called by CALL or as normal functions.


DEFAULT CHANNEL

option
Enterprise
SET DEFAULT CHANNEL chan
Specifies the channel to communicate with the user. Default value is 0.

DEG

function
Enterprise
DEG(x)
Returns x radians in degrees.

DEGREES

auxiliary
Enterprise

An auxiliary keyword for OPTION ANGLE.

DELAY

statement auxiliary
Simons
DELAY n
Sets the speed for the LIST command: n 1 = fastest, 255 = slowest.
Enterprise
An auxiliary keyword for WAIT.

DELETE

command
Plus/4
DELETE lines
Deletes lines from the program. For valid syntaxes, see LIST.
Enterprise
DELETE {lines|block}
Same as on Plus/4, with the following additions: FIRST and LAST can be used to refer to the first or last line of the program, respectively; and instead of lines, a block can be specified, referring to a function definition DEFined by the given block name. In lines, the symbol can be replaced by TO.
Spectrum
DELETE   …NO INFO  
Deletes something on the microdrive. Details unknown.


DESIGN

statement
Simons
DESIGN mode, addr
Starts designing something, depending on mode: 0 = a hires sprite, 1 = a multicolor sprite, 2 = a character. For a sprite, it should be followed by 21 @ statements; for a character, by 8.

DETECT

statement
Simons
DETECT n
Turns sprite collision detection on. n 0 = with each other, 1 = with the screen contents.

DIM

statement
all (exceptions below)
DIM variable(dimension[, ])[, ]
Declares an array. It may be of any variable type. dimensions are one or more numbers defining the highest available index of that dimension (maximum allowed is 32767); the lowest index is 0. Several arrays can be declared in a DIM statement. If an array is used with no declaration, it’s automatically dimensioned name(10).
Sinclair
The lowest index is 1, and the last dimension of a string array is the length of the strings. So, DIM a$(10, 10) declares an array of 10 strings that are 10 characters long. Arrays cannot be used with no declaration.
Enterprise
Only one or two dimensions are allowed. By DIM name(lowest TO highest), the lowest and highest indexes can be specified.


DIR

statement
Simons
DIR a$
Lists the directory of the disk, those files that match a$.

DIRECTORY

statement
Plus/4
DIRECTORY [Ddev] [{ON|,} Uunit][, a$]
Lists the directory of the files on the disk in device dev on unit unit. If a$ is present, only the files matching it will be listed.


DISABLE

statement
Simons
DISABLE
Switches ON KEY off.

DISAPA

statement
Simons
DISAPA
Used as first statement on the line, marks it for encrypting with SECURE.

DISK

statement
Simons
DISK a$
Sends a$ as a command to the floppy drive.

DISPLAY

statement
Simons
DISPLAY
Lists the strings assigned to the function keys.
Enterprise
DISPLAY £chan: AT a FROM b TO c
Defines a window to display a segment of a text or graphics video page. a is the screen row where the top line of the segment will be placed. b and c are character rows on the page to be displayed.

DISPLAY GRAPHICS

statement
Enterprise
DISPLAY GRAPHICS
Switches to graphic screen mode.

DISPLAY TEXT

statement
Enterprise
DISPLAY TEXT
Switches to character screen mode.

DIV

function
Simons
DIV(x, y)
Integer division.

DLOAD

statement
Plus/4
DLOAD a$ [Ddev][{ON|,} Uunit]
Loads a file named a$ from the disk in device dev on unit unit.


DO

statement
Plus/4|Enterprise
DO [{UNTIL|WHILE} x]
Begins a loop. If either UNTIL or WHILE is present, x is evaluated. If UNTIL is present, the loop will end when x is true. If WHILE is present, the loop will end when x is false. If neither one is present, the ending condition will be evaluated by the LOOP statement. If neither DO nor LOOP contains an ending condition, the loop can be quit only by a statement EXIT (on Plus/4) or EXIT DO (on Enterprise) or by stopping the program.

DOPEN

statement
C128
DOPEN#lf, file$[, Llength][, Ddev][{ON|,} Uunit][, write]
Opens a file on the disk. If file$ ends in: ,S = sequential file, ,P = program file. length is the record length for relative files. If write is true, it will opened for writing, otherwise for reading. If logical file number lf is bigger than 127, all writes will be automatically ended with a CR/LF. Below 128, only a CR will be sent.

DOWNB

statement
Simons
DOWNB r1, c1, r2, c2
Scrolls a rectangle of the character screen down. On the top, empty space comes in.

DOWNW

statement
Simons
DOWNW r1, c1, r2, c2
Scrolls a rectangle of the character screen down. On the top, the contents scrolled out come in.

DRAW

statement
Plus/4
DRAW [colortype], [x1, y1] [TO x2, y2 ]
Draws a line or a series of lines. x1 and y1 are the coordinates of the starting point, or if this is omitted, the graphic cursor will be used. The TO part can be repeated several times, resulting in a series of lines.
Spectrum
DRAW x, y, r
Draws a line from the graphic cursor to x, y while turning in angle r.
Simons
DRAW a$, x, y, dmode
Draws a shape. a$ describes the shape by these characters: 0 = moving right, 1 = up, 2 = down, 3 = left, 5–8 = the same with drawing, 9 = end of drawing


DS

reserved_variable
Plus/4
DS
Returns the error code of the floppy drive.

DS$

reserved_variable
Plus/4
DS$
Returns the error message of the floppy drive.

DSAVE

statement
Plus/4
DSAVE a$ [Ddev] [{ON|,} Uunit]
Saves a file named a$ on the disk in the device dev on unit unit.


DUMP

statement
Simons
DUMP
Prints the values of all scalar variables.

DUP

function
Simons
DUP(a$, n)
Returns a string containing a$, n times.

DURATION

auxiliary
Enterprise

An auxiliary keyword used for SOUND.


DVERIFY

statement
C128
DVERIFY file$[, Ddev][{ON|,} Uunit]
Compares the file$ with the program being in the memory.

EDIT

command
Enterprise
EDIT {programnumber|programname}
Chooses the active program to be used.

EDITOR BUFFER

option
Enterprise
SET EDITOR BUFFER n
Defines the size of the editor buffer as n*256 byte chunks, for editor channels subsequently opened.

EDITOR KEY

option
Enterprise
SET EDITOR KEY chan
Allows channel chan to be used as the editor’s keyboard input.

EDITOR VIDEO

option
Enterprise
SET EDITOR VIDEO chan
Allows channel chan to be used as the editor’s text page.

EL

reserved_variable
Plus/4
EL
Returns the number of the line the recent error occurred in. Same as ERRLN.

ELSE

auxiliary
Plus/4|Simons

Auxiliary keyword for IF and RCOMP.


END

statement
all, except Sinclair
END
Finishes the program.


END DEF

statement
Enterprise
END DEF
Finishes a DEF function.

END HANDLER

statement
Enterprise
END HANDLER
Finishes a HANDLER handler.

END IF

statement
Enterprise
END IF
Finishes an IF branch.

END LOOP

statement
Simons
END LOOP
Closes a LOOP loop.

END PROC

statement
Simons
END PROC
Closes a PROC procedure.

END SELECT

statement
Enterprise
END SELECT
Finishes a SELECT branch.

END WHEN

statement
Enterprise
END WHEN
Finishes a WHEN block.

ENVELOPE

statement auxiliary
Simons
ENVELOPE voice, a, d, s, r
Sets the envelope for voice (1–3) with attack, decay, sustain and release.
Enterprise
ENVELOPE £chan: NUMBER a; b, c, d, e; f, g, h, i; ; [RELEASE; j, k, l, m; ]
a identifies the envelope. For the first phase, b is the change of pitch in semitones, c and d are the change in volume for the left and right speakers, respectively (0 to 63, in proportion of the overall maximum volume set in the SOUND statement, or –63 turns the sound off), and e is the duration of the phase in 1/50 seconds. f to i are the second phase, and so on. The RELEASE part defines phases performed after the conclusion of the previous phases or at the expiry of the SOUND duration if there is no following sound on the same channel.
It’s also an auxiliary keyword for SOUND.

EPS

function
Enterprise
EPS(x)
The smallest quantity that can be added to or subtracted from x to make the computer register a change in the value of x.

ER

reserved_variable
Plus/4
ER
Returns the code of the recent error. Same as ERRN.

ERASE

statement
Spectrum
ERASE   …NO INFO  
Deletes something on the microdrive. Details unknown.


ERR$

function
Plus/4
ERR$(x)
Returns the error message belonging to error code x.


ERRLN

reserved_variable
Simons
ERRLN
Returns the number of the line the recent error occurred in. Same as EL and EXLINE.

ERRN

reserved_variable
Simons
ERRN
Returns the number of the line the recent error occurred in. Same as ER.

EXCEPTION

auxiliary
Enterprise

An auxiliary keyword for CAUSE.

EXEC

statement
Simons
EXEC label
Calls a PROC procedure. Can’t be followed by another statement in the same line.

EXIT

statement
Plus/4
EXIT
Leaves a DOLOOP loop.


EXIT DEF

statement
Enterprise
EXIT DEF
Leaves a DEFEND DEF loop

EXIT DO

statement auxiliary
Enterprise
EXIT DO
Leaves a DOLOOP loop. Also can be an auxiliary keyword for READ.

EXIT FOR

statement
Enterprise
EXIT FOR
Leave a FORNEXT loop.

EXIT HANDLER

statement
Enterprise
EXIT HANDLER
Breaks out of an exception handler, which propagates the exception to the surrounding environment. This will cause another exception handler to be activated, either a user handler or the default handler.

EXIT IF

statement
Simons
EXIT IF condition
IF condition is true, exits the LOOPEND LOOP loop.

EXLINE

function
Enterprise
EXLINE
Returns the number of the statement that caused an exception.

EXOR

function
Simons
EXOR(x, y)
Bitwise EXOR operation.

EXP

function
all
EXP(x)
Returns e = 2.7182818…, the base of the natural logarithm on the power of x.


EXSTRING$

function
Enterprise
EXSTRING$(e)
Returns the error message belonging to exception e.

EXT

statement
Enterprise
[EXT |:]command
Sends a command to the operating system. If symbol : is used, no " quotation marks are needed around the command.

EXTYPE

function
Enterprise
EXTYPE
Returns the category number of the last exception.

FAST

statement
ZX81|C128
FAST
Turns the screen off to make the program run faster. Only the SLOW or NEW statement, an error or the end of the program will turn it on again.


FAST SAVE

option
Enterprise
SET FAST SAVE {ON|OFF}
Sets the saving speed for tape. Fast speed is about 2400 baud, the default. Slow speed is 1200.

FCHR

statement
Simons
FCHR row, column, width, height, code
Fills the selected area of the screen with the character of the specified POKE code.

FCOL

statement
Simons
FCOL row, column, width, height, color
Fills the selected area of the character screen with the specified character color. The characters won’t change.

FETCH

statement
Simons
FETCH mark, n, a$
An alternative INPUT statement which accepts up to n characters in a$. mark controls the accepted character set: HOME = only unshifted letters, CRSR ↓ = only digits, CRSR → = letters, digits and punctuation.
C128
FETCH bytes, inaddr, bank, exaddr
Takes bytes bytes from the external memory, from the specified bank and address exaddr, and stores them in the internal memory from address inaddr.

FILL

statement
Simons
FILL row, column, width, height, code, color
Fills the selected area of the character screen with both the character of the POKE code and color.

FILTER

statement
C128
FILTER freq, l, b, h, res
Sets audio filtering parameters. freq is the cut-off frequency (0 to 2047), l, b and h are the low-pass, band-pass and high-pass filters, respectively (0 = of, 1 =on), and res is the resonance, 0 to 15.

FIND

statement
Simons
FINDanything
Lists the numbers of program lines where anything is found. If a space is included before anything it will be part of the search.

FIRST

auxiliary
Enterprise

An auxiliary keyword for DELETE, LIST, LLIST and RENUMBER.

FKEY

option
Enterprise
SET [£chan:] FKEY n a$
Sets function key n to produce a$ each time it is pressed. Keys 1 to 8 are unshifted function keys, 9 to 16 are shifted ones. To return all function keys to default settings, use CLEAR FKEYS.

FLASH

statement modifier
Spectrum
FLASH f
Sets the flashing for graphic statements. f 0 = normal, 1 = flash, 8 = no change. Can be used as a statement or a modifier for graphic statements.
Simons
FLASH color, speed
Makes the color flash on the character screen: 1 is slowest, 255 is fastest.


FLUSH

statement
Enterprise
FLUSH £chan
Flushes the buffer of channel chan without closing it or signalling end of file.

FN

function
Commodore
FNname(x)
Returns the value of the user function name with argument x. User functions are defined with DEF FN.
Spectrum
The arguments must be enclosed in ( ) parentheses; even if no argument the parentheses must be there.


FOR

statement
all
FOR variable=start TO end [STEP step]
Begins a loop when it counts from start to end (by 1 or step if specified), and the actual count is always in variable. It must be numeric. The end of the loop is the NEXT statement.


FORMAT

statement
Spectrum
FORMAT   …NO INFO  
Formats the microdrive. Details unknown.


FP

function
Enterprise
FP(x)
Returns the fractional part of x. Same as FRAC.

FRAC

function
Simons
FRAC(x)
Returns the fractional part of x.

FRE

function
Commodore
FRE(dummy)
Returns the amount of free memory in bytes.


FREE

function
Enterprise
FREE
The amount of free memory available to the current program.

FROM

auxiliary
Enterprise

An auxiliary keyword for CAPTURE, COPY, DISPLAY and REDIRECT.

GET

statement
Commodore
GET[#lf, ]variable$[, ]
Reads a keypress. If no key is pressed, returns an empty string. If #lf is present, reads a character from the file opened by logical file number lf. See also GETKEY and INKEY$.
Enterprise
GET £chan: variable$
Defaults to the keyboard.


GETKEY

statement
Plus/4
GETKEY a$
Waits until a key is pressed, and returns it in a$. If a numeric variable is specified, the statement will accept a digit only, otherwise it throws an error.


GLOBAL

statement
Simons
GLOBAL
Makes all LOCAL variables global.

GO

statement
Commodore
GO TO line
The GO keyword serves only to make it possible to write keyword GOTO in two words, using the TO keyword.
Beyond the definition above, on C128, the statement GO64 switches the computer to Commodore 64 mode, and performs a reset. If used as a command, a message Are you sure? will appear, and a Y keypress will make the switching. If used in a program, the message won’t appear.

GOSUB

statement
all
GOSUB line
Redirects execution to a subroutine at the program line line. It must be a numeric constant. Later, a RETURN statement will take back to the recently executed GOSUB statement.
On Sinclair, the keyword is written GO SUB and line can be an expression.


GOTO

statement
all
GOTO line
Redirects execution to the program line line. It must be numeric constant. On Commodore systems, the keyword can be written in two words: GO TO.
On Sinclair, the keyword is written GO TO and line can be an expression.


GRAPHIC

statement
Plus/4
GRAPHIC {mode[, clear]|CLR}
Sets the mode of the screen. If clear is 1, the screen is cleared.
Available screen modes:
0 = text mode
1 = high resolution graphic
2 = high resolution graphic, split screen
3 = multicolor graphic
4 = multicolor graphic, split screen
In split screen modes, the bottom of the screen displays five lines of the text screen, but above it, the graphic screen is visible.
GRAPHIC CLR frees the memory occupied by the graphic screen.
C128
Same as in Plus/4 but there is an additional mode: 5 = 80 column text.


GRAPHICS

statement
Enterprise
GRAPHICS [{{HIRES|LORES} [colors]|ATTRIBUTE}]
Sets a graphic screen mode. With no parameters, it closes and reopens the default graphics and text pages, then displays the default graphics page with 4 lines of text at the bottom. HIRES and LORES sets the high or low resolution, respectively, with the specified number of colors or with the previous value if omitted; values available are 2, 4, 16 and 256. ATTRIBUTE selects the attribute mode when each 8·1 pixel area can contain two colors.

GREEN

reserved_constant
Enterprise
GREEN
The color green = RGB(0, 1, 0).

GSHAPE

statement
Plus/4
GSHAPE a$[, [x, y][, mode]
Puts the shape stored in a$ on the screen; the shape was stored earlier by SSHAPE. x and y are the coordinates of the top left corner; if they’re omitted, the graphic cursor is used. mode can be one of the following:
0 = overwrites the earlier contents (default)
1 = inverse display
2 = in OR relation to the contents
3 = in AND relation to the contents
4 = in XOR relation to the contents


HANDLER

statement
Enterprise
HANDLER name
Defines a block of statements which deal with errors. An END HANDLER statement marks its end.

HEADER

statement
Plus/4
HEADER a$, Ddev[, Iid [{ON|,} Uunit]
Formats a floppy disk in device dev on unit unit, assigning it a name a$ and an ID number id. If Iid is omitted, the disk won’t be formatted but only erased. For new, unformatted disks, this cannot be used.


HELP

command
Plus/4
HELP
After an error, lists the line where the error was found, with the part causing the error marked. Plus/4: flashing; C128, 40 column mode: inverse; C128, 80 column mode: underlined.


HEX$

function
Plus/4
HEX$(x)
Returns the hexadecimal value of x, which can be between 0 and 65535.
Enterprise
HEX$(x$)
Returns a string of bytes given the hex values of the bytes in x$ which lists comma-separated values written in two-digit hex codes, case-insensitive.


HI COL

statement
Simons
HI COL
Restores the colors as they were before the LOW COL statement.

HIRES

statement auxiliary
Simons
HIRES ink, paper
Switches to high resolution screen and sets colors.
Enterprise
An auxiliary keyword for GRAPHICS.

HRDCPY

statement
Simons
HRDCPY
Prints the character screen on the printer.

I

auxiliary
Plus/4

Auxiliary keyword for HEADER.

IF

statement
all (exceptions below)
IF expression {THEN {statements|line}|GOTO line}
Evaluates expression. If the result is non-zero, executes the statements to the end of the line, or if GOTO line or THEN line is used, redirects execution.
Plus/4 Simons
IF expression {THEN {statements|line}|GOTO line}[: ELSE {statements|line}]
An ELSE clause can be added. These statements will be executed if the result is false.
C128
See also BEGIN and BEND.
ZX81
IF expression THEN statement


IF MISSING

auxiliary
Enterprise

An auxiliary keyword for INPUT and READ.

IMAGE

statement
Enterprise
IMAGE: format
Like PRINT USING on some systems, it defines the format of output for the PRINT statement. Everything after the symbol : to the end of line is part of the format, which can contain the following characters: for numeric values: , a , comma, $ a floating $ sign, a floating space or sign, + a floating + or sign, % a digit or a leading zero, £ a digit or space, trailing zeros after a decimal point, * a digit or leading *, . a decimal point, ^ (minimum 4) the exponent part; for string values: < left justification (must start the field), > right justification, £ a character.

IN

function
Spectrum
IN port
Reads a value from a processor port which must be between 0 and 65535.
Enterprise
IN(port)


INF

reserved_constant
Enterprise
INF
The largest positive number the computer can handle = 9.999999999*10^62.

INFO

statement
Enterprise
INFO
Gives a printout of the system memory and available memory, and a listing of programs with their sizes and first lines. Clears all variables.

INK

statement modifier option
Spectrum
INK i
Sets the ink color of graphic statements. i 0–7 = a color, 8 = transparent, 9 = contrast. Can be used as a statement or a modifier for graphic statements.
Enterprise
SET [£chan:] INK i
i is a palette number except in 256 colors mode when it is a standard color code.


INKEY

function
Simons
INKEY
Waits for a function key to be pressed and returns its number.

INKEY$

function
Sinclair Enterprise
INKEY$
Reads a keypress. If no key is pressed, returns an empty string. See also GET.


INPUT

statement
all (exceptions below)
INPUT [message;] variable[, ]
If message (a string constant) is present, displays it. Displays a ? question mark, then waits for keyboard input. As many variables are provided in the statement, so many values are expected, separated by , commas, of the same type as required by the statement.
ZX81
INPUT variable
Spectrum
INPUT [[(]message[)];] [LINE] variable
The message can contain everything allowed in PRINT. If there is any variable in message, the complete prompt must be in ( ) parentheses. If variable is a string variable, a pair of " quotation marks appear in the left part of the screen, unless LINE is specified before variable, which must be a string variable in this case.
Enterprise
INPUT £chan [IF MISSING action,] [AT row, column,] [PROMPT prompt:] variable[, ]
Reads variables from channel chan. prompt replaces the default ? prompt. action is executed when there is no value (see READ). AT puts the prompt to the specified row and column. IF MISSING and PROMPT may be in either order.


INPUT#

statement
Commodore
INPUT#lf, variable[, ]
Like INPUT but reads the values from the file opened with the logical file number lf.


INSERT

function
Simons
INSERT(needle, haystack, offset)
Returns haystack, inserting needle in it at the offsetth character, before the rest of haystack.

INST

function
Simons
INST(needle, haystack, offset)
Returns haystack, inserting needle in it at the offsetth character, overwriting the rest of haystack.

INSTR

function
Plus/4
INSTR(haystack$, needle$[, offset])
Searches for the first occurrence of needle$ in haystack$ from offset and returns the character offset, or 0 if not found.


INT

function
all
INT(x)
Returns the integer part of x. This is the biggest integer which is smaller than x. Thus, INT(1.5) = 1 but INT(–1.5) = –2.


INTERRUPT

auxiliary
Enterprise

An auxiliary keyword used for SOUND.

INTERRUPT CODE

option
Enterprise
ASK INTERRUPT CODE var
Asks the software interrupt code for the last interrupt.

INTERRUPT KEY

option
Enterprise
SET INTERRUPT KEY {ON|OFF}
When ON, causes a software interrupt for any keypress.

INTERRUPT NET

option
Enterprise
SET INTERRUPT NET {ON|OFF}
Turns on or off the software interrupt caused by receiving data from the network.

INTERRUPT STOP

option
Enterprise
SET INTERRUPT STOP {ON|OFF}
Turns on or off the software interrupt from the STOP key.

INV

statement
Simons
INV row, column, width, height
Inverts the selected part of the character screen.

INVERSE

statement modifier
Spectrum
INVERSE i
Sets the true or inverse video for graphic statements. i 0 = true video, 1 = inverse video. Can be used as a statement or a modifier for graphic statements.


IP

function
Enterprise
IP(x)
Returns the integer part of x, the decimal part chopped off.

JOY

function
Plus/4
JOY(x)
Returns the status of the joystick x where x can be 1 or 2. The values are:
0 = no movement
1 = forward
2 = forward right
3 = right
4 = right backward
5 = backward
6 = backward left
7 = left
8 = left forward
128 is added if the fire button is pressed.
Simons
JOY
The values returned are the same as on Plus/4.
Enterprise
JOY(n)
n is the number of the joystick, 0 is the built-in one, 1 and 2 are additional ones. Values returned:
1 = right
2 = left
4 = down
8 = up
16 = fire button (for the built-in joystick, it’s the space key)


KEY

statement
Plus/4
KEY [n, a$]
Assigns the string a$ to the function key n (1 to 8; the HELP key is the 8th). If no parameter is given, lists the assignments.
Simons
The statement is written the same as on Plus/4. But the key assignment is different, because the computers themselves are numbering them differently.


KEY CLICK

option
Enterprise
SET KEY CLICK {ON|OFF}
Sets the click for keypresses on or off.

KEY DELAY

option
Enterprise
SET KEY DELAY t
Sets the keyboard delay before auto-repeat starts to t/50 second.

KEY RATE

option
Enterprise
SET KEY RATE t
Sets the keyboard auto-repeat rate to t/50 seconds.

L

auxiliary
Plus/4

Auxiliary keyword for DOPEN.

LAST

auxiliary
Enterprise

An auxiliary keyword for DELETE, LIST, LLIST and RENUMBER.

LBOUND

function
Enterprise
LBOUND(array[, dim])
Returns the lower bound of the array in the dimth dimension or in the only one if dim is omitted.

LCASE$

function
Enterprise
LCASE$(s$)
Returns s$ converted to lowercase characters.

u🟩LEFT
auxiliary
Enterprise

An auxiliary keyword used for SOUND.

LEFT$

function
all, except Sinclair
LEFT$(a$, x)
Returns x characters from the left side, i.e. from the beginning of a$.


LEFTB

statement
Simons
LEFTB r1, c1, r2, c2
Scrolls a rectangle of the character screen left. From the right, empty space comes in.

LEFTW

statement
Simons
LEFTW r1, c1, r2, c2
Scrolls a rectangle of the character screen left. From the right, the contents scrolled out come in.

LEN

function
all
LEN(a$)
Returns the length (the number of characters) of a$.


LET

statement
all (exceptions below)
[LET] variable=value
Stores the value in variable. They must be of the same type.
In most BASIC dialects, the keyword LET can be omitted. A statement which doesn’t begin with a keyword is considered a LET statement.
Sinclair
The keyword LET mustn’t be omitted. A variable mustn’t be referred to before giving it a value with a LET statement or, for an array, before declaring it in a DIM statement.
Substrings (see the keyword entry for ( ) parentheses) can stand at the left side of the = symbol. This makes only a portion of the string to be changed. If the assigned string is longer than the substring range specified, its end will be truncated. If it is shorter, it will be filled at the end with spaces. Characters beyond the substring range won’t change.
Enterprise
[LET] variable[, ]=value
Several variables (including array elements) can be specified and all will receive the same value. The keyword LET must be written only if a variable’s name is a keyword.


LINE

statement auxiliary
Simons
LINE x1, y1, x2, y2, dmode
Draws a line. dmode: see ANGL.
Spectrum
An auxiliary keyword for INPUT and SAVE.


LINE INPUT

statement
Enterprise
LINE INPUT £chan [IF MISSING action,] [AT row, column,] [PROMPT prompt:] variable[, ]
Details see at INPUT (section Enterprise). Reads a whole line, including commas etc. for each variable. Only string variables are allowed.

LINE MODE

option
Enterprise
SET [£chan:] LINE MODE m
Determines the way colors of the existing display and newly plotted lines interact. m = 0 overwrites anything plotted before, 1 means an OR relation, 2 AND relation, 3 XOR relation.

LINE STYLE

option
Enterprise
SET [£chan:] LINE STYLE s
Sets line style to s = 1 to 14 which means various types of broken lines.

LIST

command
all (exceptions below)
LIST [lines]
Lists the lines of the program. If lines are specified, only a part of the list is shown. Possible ranges:
first
first
last
firstlast
ZX81
LIST [line]
Only one number can be given, and it lists a screenful of the program from that line. Also, it makes the line the current line (the one marked for editing).

Enterprise
LIST [£chan:][{lines|blockname}]
See DELETE for details.

LLIST

statement
Sinclair
LLIST [line]
Lists the lines of the program on the printer. If line is specified, the listing begins from that line.
Enterprise
LLIST [£chan:][{lines|blockname}]
See LLIST for details.


LN

function
Sinclair
LN x
Returns the natural logarithm of x. Same as LOG.


LOAD

command
Commodore
LOAD [filename$[, device]]
Loads a program from the specified device. If filename$ is specified (not an empty string), the program with the appropriate name will be searched. Otherwise, the first one is loaded.
Sinclair
LOAD filename$
Spectrum
LOAD filename DATA [$]()
Loads an array from the filename. If the $ symbol is present, it is a string array; without it, a numeric array.
LOAD filename CODE [addr[, len]]
Loads the file into the memory from address addr, at most len bytes if it’s specified. If addr is missing, it is loaded to the address it was saved from.
LOAD f SCREEN$
Loads the contents of the screen.
Enterprise
LOAD [{[£chan:]filename|devicename}]
If no channel is specified, loads from cassette, or disk if attached. With no parameter, it loads the first file. See OPEN for devicename. The loaded program replaces the current one in memory. If multiple BASIC programs have been saved as one file, these will replace all programs in memory.


LOCAL

statement
Simons
LOCAL variable[, ]
Makes the listed variables local for a part of the program; they must be defined earlier.

LOCATE

statement
Plus/4
LOCATE x, y
Puts the graphic cursor to the given location. The contents of the screen won’t change.


LOG

function
all
LOG(x)
Returns the natural logarithm of x. Same as LN.

LOG10

function
all
LOG10(x)
Returns the base 10 logarithm of x.

LOG2

function
all
LOG2(x)
Returns the base 2 logarithm of x.

LOOK

statement
Enterprise
LOOK [£chan] [AT x, y:] v
On the page chan or on the standard graphics page, looks at point x, y or if this is missing, the point at the graphic cursor, and puts the palette color found there to v. If AT is present, it moves the graphic cursor to x, y.

LOOP

statement
Plus/4|Enterprise
LOOP [{UNTIL|WHILE} x]
Closes a loop, started by a DO statement. If either UNTIL or WHILE is present, x is evaluated. If UNTIL is present, the loop will end when x is true. If WHILE is present, the loop will end when x is false. If neither one is present, the ending condition will be evaluated by the DO statement.
Simons
LOOP
Marks the beginning of a LOOPEND LOOP loop.


LORES

auxiliary
Enterprise

An auxiliary keyword for GRAPHICS.

LOW COL

statement
Simons
LOW COL a, b, c
In multicolor graphics, sets three alternative colors.

LPRINT

statement
Sinclair|Enterprise
LPRINT [element][separator][]
Works the same as PRINT but for the printer. AT works the same way as TAB.


LTRIM$

function
Enterprise
LTRIM$(s$)
Removes all spaces from the beginning of s$.

MAGENTA

reserved_constant
Enterprise
MAGENTA
The color magenta = RGB(1, 0, 1).

MAX

function
Enterprise
MAX(a, b)
Returns the bigger number of a and b.

MAXLEN

function
Enterprise
MAXLEN(s$)
Gives the maximum length specified for s$.

MEM

statement
Simons
MEM
Copies the character memory from the ROM to the RAM, to make it redefinable.

MERGE

statement
Spectrum
MERGE filename$
Loads the filename$ but doesn’t delete the old am nor its variables. Both were present at the same time. Lines with the same number will replace old lines; variables with the same name will replaces old variables.
Simons
MERGE filename$, device
The same as on Spectrum but requires a device number to load it from.
Enterprise
MERGE £chan:filename
Only in immediate mode. Clears variables.


MID$

function
all, except Sinclair
MID$(a$, from, count)
Returns a part of a$ from the character number from (the first character is numbered 1) in the length of count characters.
On Commodore, it can be a statement:
MID$(a$, from, count)=b$
This replaces the given portion of a$ with b$. Here, a$ must be a variable.


MIN

function
Enterprise
MIN(a, b)
Returns the smaller number of a and b.

MMOB

statement
Simons
MMOB sprite, x1, y1, x2, y2, size, speed
Makes a sprite visible and moves it between the specified coordinates, with the speed: 1 = slowest, 255 = fastest. size 0 = normal, 1 = doubled in x direction, 2 = doubled in y direction, 3 = doubled in both directions.

MOB OFF

statement
Simons
MOB OFF sprite
Makes a sprite not visible.

MOB SET

statement
Simons
MOB SET sprite, block, color, priority, mode
Defines parameters of a sprite. block is the number of the memory block specified in the DESIGN statement; color is the color marked with B (for high resolution) or C (for multicolor) in the @ statements; priority is 0 = the sprite covers the screen contents, 1 = the sprite appears behind the screen contents; mode• is 0 = high resolution, 1 = multicolor.

MOD

function
Simons Enterprise
MOD(a, b)
Modulo function.

MONITOR

command
Plus/4
MONITOR
Enters the machine code monitor.


MOVE

statement
Spectrum
MOVE   …NO INFO  
Moves something on the microdrive. Details unknown.
Simons
MOVE row, column, width, height, row2, column2
Copies a selected area of the character screen to another place.


MOVSPR

statement
C128
MOVSPR sprite, {x, y|a # s}
Moves a sprite to another location. x and y may be absolute or relative coordinates, or instead, the sprite can be moved by angle a (0 to 360) and speed s (0 to 15).

MULTI

statement
Simons
MULTI a, b, c
Switches to multicolor graphic screen and sets colors.

MUSIC

statement
Simons
MUSIC length, music$
Plays music defined in music$: a CLR character and a digit specifies the voice; letters CDEFGAB the notes; SHIFT+CDEFGAB are notes with #; numbers 08 are octaves; Z is pause; function keys are for the note length. length is the overall length of the notes: 1 = longest, 255 = shortest.

NAME

auxiliary
Enterprise

An auxiliary keyword for OPEN.

NET

auxiliary
Enterprise

An auxiliary keyword for CLEAR.

NET CHANNEL

option
Enterprise
ASK NET CHANNEL n
Returns the channel number from which there is data in a network buffer waiting to be read. When the first byte is read from this channel, NET CHANNEL moves on to pointing at the next channel. 255 is returned if no more channels have data.

NET MACHINE

option
Enterprise
ASK NET MACHINE n
Returns the network number of the remote machine.

NET NUMBER

option
Enterprise
SET NET NUMBER n
Sets the computer’s network address number. n must be 1 to 32.

NEW

command
all
NEW
Deletes the program and variables stored in the memory.


NEW ALL

statement
Enterprise
NEW ALL
Deletes all programs and variables, and returns to program 0.

NEXT

statement auxiliary
all
NEXT [variable][, ]
Returns to the FOR statement specifying the loop with variable or if it’s omitted, to the recent one. If several variables are specified, it continues the first loop, then when it’s finished, the second loop, and so on.
Sinclair
NEXT variable
On Plus/4, also an auxiliary keyword for RESUME.


NO ERROR

statement
Simons
NO ERROR
Switches back to the normal error handling of BASIC.

NOT

operator
all
NOT x
Returns the bitwise NOT value of x.


NRM

statement
Simons
NRM
Switches back to the character screen from the graphic one.

NUMBER

auxiliary
Enterprise

An auxiliary keyword for ENVELOPE.

NUMERIC

statement
Enterprise
NUMERIC variable[, ]
Declares numeric variables or arrays. If within a DEF block, they’re local.

OFF

statement auxiliary
Simons
OFF
Switches the FLASH statement off.
Enterprise
an auxiliary keyword for SET and TRACE.

OLD

command
Simons
OLD
Restores the program after a NEW statement.

ON

statement auxiliary
Commodore|Enterprise
ON x {GOSUB|GOTO} line[, ]
Evaluates x. Depending on its value, it executes a GOSUB or GOTO statement to the given line: if x = 1, the first one, if x = 2, the second one, and so on. If x is less than 1 or more than the number of line numbers, the execution continues on the next statement. All line numbers must be numeric constants.
On Plus/4, also an auxiliary keyword for APPEND, BACKUP, COLLECT, COPY, DIRECTORY, DLOAD, DSAVE, HEADER, RENAME and SCRATCH. On C128, also an auxiliary keyword for BOOT, CATALOG, CONCAT, DCLEAR, DCLOSE, DOPEN and DVERIFY. On Enterprise, also an auxiliary keyword for SET and TRACE.

ON ERROR

statement
Simons
ON ERROR: GOTO line
Upon an error, jumps to line.

ON KEY

statement
Simons
ON KEY a$: GOTO line
If a key which is listed in a$ is pressed it jumps to line, placing the key in ST.

OPEN

statement
Commodore
OPEN lf, dev, sec, a$
Opens a logical file number lf on the device dev. sec is a secondary address that may be needed on some devices, and a$ is a file name or a command to be sent to the device. (See device in Concepts.)
Enterprise
OPEN £channel:[NAME] {device|filename} [ACCESS {INPUT|OUTPUT}]
Connects a device or a filename to a channel. ACCESS INPUT (default) attempts to use an existing file. ACCESS OUTPUT attempts to create a new file.


OPEN#

statement
Spectrum
OPEN#   …NO INFO  
Opens a file on the microdrive. Details unknown.


OPTION

command
Simons
OPTIONn
After n = 10, Simons’ BASIC keywords will be LISTed inverted.

OPTION ANGLE

statement
Enterprise
OPTION ANGLE {DEGREES|RADIANS}
Selects the base unit for subsequent angle operations. Default is RADIANS.

OR

operator
all
x OR y
Returns the bitwise OR value of the operands.


ORD

function
Enterprise
ORD(a$)
Returns the ASCII code of the first character of a$, according to the ASCII table of the computer. Same as ASC and CODE.

OUT

statement
Spectrum|Enterprise
OUT port, byte
Sends the byte to the port.
Simons
OUT
Turns ON ERROR off.


OVER

statement modifier
Spectrum
OVER o
Sets the overprinting mode for graphic statements. o 0 = off, 1 = on. Overprinting means the new contents will be XOR mixed with the old contents. Can be used as a statement or a modifier for graphic statements.


P

auxiliary
C128

Auxiliary keyword for BLOAD, BSAVE.

PAGE

command
Simons
PAGE n
Sets how many screen lines should LIST use. If n = 0, switches back to normal listing.

PAINT

statement
Plus/4
PAINT [colortype][, [x, y][, mode]
Paints an area, starting from the point x, y or the graphic cursor. If mode is 0, the painting finishes at non-background points; if 1, it finishes at background points.
Simons
PAINT x, y, dmode
Same as on Plus/4, just the order of parameters is different. dmode: see ANGL.


PALETTE

option
Enterprise
SET [£chan:] PALETTE a, b, c, d, e, f, g, h
Sets the values of the first 8 colors of the palette which are used by SET PAPER and SET INK. In color mode 0, a and b are used. In color mode 1, a to d are used. Colors are specified by color codes 0 to 255 or by the RGB function. The second half of the 16 color palette can be specified by SET BIAS.

PAPER

statement modifier option
Spectrum
PAPER p
Sets the paper color of graphic statements. p 0–7 = a color, 8 = transparent, 9 = contrast. Can be used as a statement or a modifier for graphic statements.
Enterprise
SET [£chan:] PAPER p


PAUSE

statement
ZX81
PAUSE time
Pauses the execution for time 1/50 seconds or until a key is pressed.
{L}Simons
PAUSE message$, s
Prints message$ and pauses the execution for s seconds.


PEEK

function
all
PEEK(address)
Returns the byte value stored at the address in the memory.


PEN

function
C128
PEN(n)
Returns information about the light pen: n 0 = the x coordinate, 1 = the y coordinate, 2 and 3 = same on the 80 column screen, 4 = the fire button.

PENX

function
Simons
PENX
Returns the x coordinate of the light pen.

PENY

function
Simons
PENY
Returns the y coordinate of the light pen.

PI

reserved_variable
Spectrum Enterprise
PI
Returns the value of π = 3.141596… Same as π.


PING

statement
Enterprise
PING
Produces a ping sound.

PITCH

auxiliary
Enterprise

An auxiliary keyword used for SOUND.

PLACE

function
Simons
PLACE(needle$, haystack$)
Searches for the first occurrence of needle$ in haystack$ and returns the character offset, or 0 if not found.

PLAY

statement
Simons
PLAY mode
mode: 0 = turns music off, 1 = plays it and after it execution will continue, 2 = starts playing while execution continues.
C128
PLAY a$
Plays a piece of music stored in a$. Its elements include (x means a digit): Vx = voice (1 to 3); Ox = octave (0 to 6); Tx = envelope (see below); Ux = volume (0 to 15); Xx = filter (0 = off, 1 = on); A, B, C, D, E, F, G = notes; # = sharp; $ = flat; W = whole note; H = half; Q = quarter; I = eighth; S = sixteenth; . = dotted; R = rest; M = wait for all voices currently playing to end the current measure. Modifiers precede the notes they apply to.
Envelope numbers: 0 = piano, 1 = accordion, 2 = calliope, 3 = drum, 4 = flute, 5 = guitar, 6 = harpsichord, 7 = organ, 8 = trumpet, 9 = xylophone.

PLOT

statement
ZX81
PLOT x, y
Paints the screen element at coordinates x, y black. Actually, this means replacing the character there with a graphic character having one black quarter more. x must be between 0 and 63, y must be between 0 and 43.
Spectrum
A real pixel is plotted, so x must be between 0 and 255 and y between 0 and 175.
Simons
PLOT x, y, dmode
Plots a pixel. dmode: see ANGL.
Enterprise
PLOT [£chan:]{x, y[{,|;} ]{,|;}|ANGLE r|FORWARD d|BACK d|LEFT r|RIGHT r|ELLIPSE x, y|PAINT}
x and y are point coordinates. A list of coordinate pairs paints points at the given coordinates. When the pairs are separated by a , comma, the drawing beam is turned off; when they’re separated by a ; semicolon, it is turned on. Same is true at the end of the coordinate list. Drawing the first point, if the beam was previously on, a line is drawn to the point.
Five elements work with a turtle. r is an angle in degrees, and d is a distance in pixels. FORWARD and BACK moves the turtle forward or back, respectively, in the direction it is pointing to. LEFT and RIGHT turns the turtle left or right, respectively, and ANGLE sets its angle directly: 0 means right, and it is measured anticlockwise.
ELLIPSE draws an ellipse with the given axes. PAINT paints the area around the beam, till the edges drawn by colors different from the current COLOUR
All the elements can be specified many times, in any order.
The current COLOUR, INK, LINE MODE and LINE STYLE will be used.


POINT

function
Spectrum
POINT x, y
Returns the color of the graphic point: 0 = PAPER color, 1 = INK color. x must be 0 to 255, y 0 to 175.


POINTER

function
C128
POINTER(variable)
Returns the address of the variable.

POKE

statement
all
POKE address, value
Stores the value at the address in the memory.


POS

function
Commodore
POS(dummy)
Returns the logical position of the cursor in the screen line.
Enterprise
POS(haystack$, needle$[, offset])
Returns the position of needle$ in haystack$ from the offsetth character, or 0 if not found.

POT

function
Simons
POT(n)
Returns the value of paddle n (0 or 1).
C128
Same as in Simons but n can be between 1 and 4.

PRINT

statement
all (exceptions below)
PRINT [element][separator][]
On Commodore systems, the PRINT keyword can be abbreviated to a ? question mark.
An element can be a valid expression of any type or a special PRINT modifier: SPC or TAB (see there).
separators can be the following:
; (semicolon) puts the cursor immediately after the last printed character
, (comma) puts the cursor to the next comma-separated column
(apostrophe) only on Spectrum puts the cursor at the beginning of the next row
If the statement ends with no separator, the cursor is put at the first column of the next row.
Comma-separated columns: the screen is horizontally split into fixed columns. A comma in a PRINT statement puts the cursor to the next column, or if the rightmost column is reached, the first character of the next row.
Commodore – 4 columns, 10 characters wide
ZX81 – 2 columns, 11 characters wide
Regularly, positive numbers are printed with a leading space character; negative numbers have a – minus character instead. Fractional numbers are printed without a leading zero (.5 and –.5 instead of 0.5 and –0.5).
On Enterprise, a £chan channel specification may also be present. An element may be USING {ln|string}: where ln is the number of an IMAGE statement defining the printing format, or string may define it directly.


PRINT#

statement
Commodore
PRINT#lf, [element][separator][, ]
The same as PRINT but to the file opened with logical file number lf. In this statement, the keyword PRINT cannot be abbreviated by a ? question mark.


PRINT USING

statement
Plus/4
PRINT USING format; values
Creates a formatted printout. In format, the following characters are used:
# = place for a digit or character
+ = place for a positive sign
= place for a positive or negative sign
. = place for a decimal point
, = place for a separator
$ = place for a dollar symbol
^^^^ = place for the exponent
= = centered
> = right adjusted


PROC

statement
Simons
PROC label
Marks a line with a label. It isn’t in " quotation marks. No other statements can follow it on the same line: all the rest of the line is the label. Such labels can be called without return by CALL or with return by EXEC.

PROGRAM

statement
Enterprise
PROGRAM name[(variable[, ])]
Defines the name of the current program to be used in CHAIN and SAVE. variables are passed by value by CHAIN.

PROMPT

auxiliary
Enterprise

An auxiliary keyword for INPUT.

PUDEF

statement
Plus/4
PUDEF a$
Redefines the output characters in PRINT USING with a$ which can contain up to 4 characters:
1st = the separator
2nd = the comma
3rd = the decimal point
4th = the $ symbol


RAD

function
Enterprise
RAD(x)
Returns x degrees in radians.

RADIANS

auxiliary
Enterprise

An auxiliary keyword for OPTION ANGLE.

RAND

statement
ZX81
RAND [x]
Sets the random number generator seed to x. If x is omitted or 0, the seed will be taken from the number of frames generated so far on the television. Same as RANDOMIZE.


RANDOMIZE

statement
Spectrum|Enterprise
RANDOMIZE [x]
Sets the random number generator seed to x. If x is omitted or 0, the seed will be taken from the number of frames generated so far on the television. Same as RAND.
On the Spectrum keyboard, it’s spelled RAND, but on the screen it is RANDOMIZE.


RCLR

function
Plus/4
RCLR(colortype)
Returns the color assigned to the colortype.


RCOMP

statement
Simons
RCOMP: statements[: ELSE: statements]
Evaluates the condition of the most recent IF again, and executes either the statements of the true branch or the false one.

RDOT

function
Plus/4
RDOT(n)
Returns information about the graphic cursor, depending on n:
0 = the x coordinate
1 = the y coordinate
2 = the colortype


READ

statement
all, except ZX81
READ variable[, ]
Reads one or more values from the DATA lines to the variables. The values and the variables must match in type.
Enterprise
READ [IF MISSING {ln|EXIT DO}:] variable[, ]
If there is no more DATA, and IF MISSING is included, a GOTO ln or an EXIT DO is executed.


REC

statement
Simons
REC x, y, width, height, dmode
Draws a rectangle. dmode: see ANGL.

RECORD

statement
C128
RECORD lf, rec[, byte]
Sets a file pointer of a relative file opened with logical file number lf to the record rec and byte byte.

RED

reserved_constant
Enterprise
RED
The color red = RGB(1, 0, 0).

REDIRECT

statement
Enterprise
REDIRECT FROM £ch1 TO £ch2
Redirects input from channel ch1 to ch2 until the end of the file is reached, the program is halted, or a later REDIRECT statement is issued with ch2 = 255.

RELEASE

auxiliary
Enterprise

An auxiliary keyword for ENVELOPE.

REM

statement function
all (exceptions below)
REM [text]
Does not do anything. Everything to the end of the line is ignored. This is the way to include comments in the program list.
Enterprise
Keyword REM may be abbreviated by an ! exclamation point.
REM(a, b)
Returns the remainder of a divided by b.


REM1

option
Enterprise
SET REM1 {ON|OFF}
Controls remote control switch 1. (Also controlled by tape operations.)

REM2

option
Enterprise
SET REM2 {ON|OFF}
Controls remote control switch 2. (Also controlled by tape operations.)

RENAME

statement
Plus/4
RENAME old$ to new$[, Ddev] [{ON|,} Uunit]
Renames a file old$ to a new name new$ in device dev on unit unit.


RENUMBER

command
Plus/4
RENUMBER from[, step][, beginning]
Renumbers the lines of the program. The first line will get the number from, and further lines will be increased by step. The default is 10 for both. If beginning is given, that is the first line of the program to be renumbered. Line numbers in GOTO and GOSUB statements are also renumbered.
Simons
RENUMBER from, beginning
Same as on Plus/4 but lacks step and doesn’t renumber line numbers in GOTO and GOSUB statements. However, they aren’t needed in Simons’ BASIC since there are PROC, CALL and EXEC.
Enterprise
RENUMBER [{line1 TO line2|blockname}] [AT at] [STEP step]
Can renumber the whole program or just a part of it. line1 and line2 can be line numbers, FIRST or LAST. blockname is the name of a DEF or HANDLER block. If no lines are specified, it means the whole program. at is the first new number, or the number of the first line to be renumbered. step defaults to 10.
References to renumbered lines are changed. RENUMBER cannot change the order of line, so if the renumbered lines would overlay or surround lines not renumbered, or would be put into a new place in the sequence, the command is not executed.


REPEAT

statement
Simons
REPEAT
Marks the beginning of a REPEATUNTIL loop

RESET

statement
Simons
RESET line
Restores the DATA pointer to the beginning of line line.

RESTORE

statement
all, except ZX81
RESTORE
Restores the DATA pointer to the beginning of the program, so subsequent READ statements will read the data from the first DATA line.
Plus/4 Spectrum Enterprise
RESTORE [line]
If line is given, restores the DATA pointer to the beginning of that line.


RESUME

statement
Plus/4
RESUME [line|NEXT]
Resumes the execution from the error handling routine. If line is specified, it will return to that line. With NEXT, execution continues with the next statement. If neither is given, it tries to execute the statement which caused the error again.
Simons
RESUME
Switches an ON KEY statement, after switching it off, on again.


RETRACE

statement
Simons
RETRACE
Puts the TRACE windows back on the screen after a clear screen.

RETRY

statement
Enterprise
RETRY
Used as an exit from an exception handler, returns control to the statement which caused the exception.

RETURN

statement
all
RETURN
Finishing the current subroutine, returning to the recently executed GOSUB statement.


RGB

function
Enterprise
RGB(red, green, blue)
Returns the color number by mixing red, green and blue. Each color ingredient may be specified from 0 to 1.

RGR

function
Plus/4
RGR(dummy)
Returns the current mode as set in the GRAPHIC statement.


RIGHT

auxiliary
Enterprise

An auxiliary keyword used for SOUND.

RIGHT$

function
all, except Sinclair
RIGHT$(a$, x)
Returns x characters from the right side, i.e. from the end of a$.


RIGHTB

statement
Simons
RIGHTB r1, c1, r2, c2
Scrolls a rectangle of the character screen right. From the left, empty space comes in.

RIGHTW

statement
Simons
RIGHTW r1, c1, r2, c2
Scrolls a rectangle of the character screen right. From the left, the contents scrolled out come in.

RLOCMOB

statement
Simons
RLOCMOB sprite, x, y, size, speed
Moves a sprite earlier made visible with MMOB

RLUM

function
Plus/4
RLUM(colortype)
Returns the luminosity of the color assigned to colortype.


RND

function
all (exceptions below)
RND(x)
Returns a random (actually, pseudorandom) number. x is a dummy.
Commodore
if x > 0, it returns the next number in a random series
if x < 0, it returns the same number for the same x
if x = 0, it returns a number based on the internal clock
Sinclair
RND
Enterprise
RND[(x)]
Returns a random number between 0 and (less than) 1, or if x is given, an integer between 0 and (less than) x.


ROT

statement
Simons
ROT angle, size
Sets the rotation angle (in 45° steps) and zoom size of shapes to be drawn with DRAW.

ROUND

function
Enterprise
ROUND(x, n)
Rounds x to n decimal places.

RSPCOLOR

function
C128
RSPCOLOR(n)
Returns the multicolor sprite colors n 1 or 2.

RSPPOS

function
C128
RSPPOS(sprite, n)
Returns information about a sprite. n 0 = x position, 1 = y position, 2 = the speed.

RSPRITE

function
C128
RSPRITE(sprite, n)
Returns information about a sprite. n: 0 = on, 1 = color, 2 = covered by contents, 3 = x zoom, 4 = y zoom, 5 = multicolor. Except the color, any parameter returns 0 = off or 1 = on.

RTRIM$

function
Enterprise
RTRIM$(s$)
Removes spaces from the end of s$.

RUN

command
all (exceptions below)
RUN [line]
Runs the program from the first line, or from the specified line. Before that, deletes all variables.
Enterprise
RUN [{[{[£chan:]filename|devicename}](variable[, ])|line}]
If a filename is given, the program is loaded and run. Parameter variables can be passed to the program, they must correspond with parameters declared in PROGRAM.


RWINDOW

function
C128
RWINDOW(n)
Returns information about the screen window. n 0 = number of rows, 1 = number of columns, 2 = returns 40 or 80, based on the active screen mode.

SAVE

command
Commodore
SAVE filename$[, device]
Saves a program to the specified device.
Sinclair
SAVE filename$
Spectrum
Saves the variables along with the program.
SAVE filename LINE line
After LOADing the program back, it will automatically start at line.
SAVE filename DATA [$]()
Saves an array. If the $ symbol is present, it’s a string array; without it, a numeric array.
SAVE filename CODE addr, len
Saves len bytes from address addr.
SAVE filename SCREEN$
Saves the screen.
Enterprise
SAVE [{[ALL] [£chan:]filename|devicename}]
If no filename is given, the PROGRAM name is used. SAVE ALL saves all programs in memory.


SCALE

statement
Plus/4
SCALE mode
Selects the scaling mode on the graphic screen. Default is 0 when the coordinates are the same as the physical coordinates; if it is 1, both x and y coordinates run from 0 to 1023. The physical resolution doesn’t change.


SCNCLR

statement
Plus/4
SCNCLR
Clears the active screen.
C128
SCNCLR [mode]
If mode is present, it clears the screen specified (see GRAPHIC).


SCRATCH

statement
Plus/4
SCRATCH file$[, Ddev] [{ON|,} Uunit]
Deletes one or more file$s from the disk in device dev on unit unit.


SCREEN$

function auxiliary
Spectrum
SCREEN$(row, column)
Returns the character at the given character position. row must be 0 to 23, column 0 to 31. Cannot recognize UDG characters.
Also an auxiliary keyword for LOAD and SAVE.


SCRLD

statement
Simons
SCRLD lf, dev, sec, name$
Loads the character screen from file. Parameters are like in the OPEN statement.

SCRSV

statement
Simons
SCRSV lf, dev, sec, name$
Saves the character screen. Parameters are like in the OPEN statement.

SCROLL

statement option
ZX81
SCROLL
Scrolls the contents of the screen one row up, deleting the top line. Subsequent PRINT statements will write in the bottom row.
Enterprise
SET [£chan:] SCROLL {ON|OFF}
Turns automatic scroll on or off.
SET [£chan:] SCROLL {DOWN|UP} n, m
Scrolls the screen down or up from line n32 to m32.


SEC

function
Enterprise
SEC(x)
Returns the secant of x.

SECURE

command
Simons
SECURE 0
After executing it, lines marked with DISAPA won’t be listed, only their line numbers, but they will be executed anyhow.

SELECT

statement
Enterprise
SELECT [CASE] expression
CASE {values|IS relation|ELSE}
statements
END SELECT
Evaluates expression, and depending on the result, executes the statements following either CASE line. Several CASE clauses can be specified, followed by one or more statements. values can be one or more values and/or ranges (in the format lowest TO highest), separated by commas. relation is an expression beginning with a relational operator. If the result of expression is equal to either value or falls within either range, or expression IS relation is true, the following statements are executed. If no CASE line is matched, CASE ELSE is executed if specified. Only one CASE ELSE is allowed and it must be the last one.

SERIAL BAUD

option
Enterprise
SET SERIAL BAUD m
Sets the baud rate for the RS232 port and the network. m is a mode parameter: 0 – 50, 1 – 75, 2 – 110, 3 – 134.5, 4 – 150, 5 – 200, 6 – 300, 7 – 600, 8 – 1200, 9 – 1800, 10 – 2400, 11 – 3600, 12 – 4800, 13 – 7200, 14 – 9600, 15 – 9600.

SERIAL FORMAT

option
Enterprise
SET SERIAL FORMAT b
Defines the word format for the serial device drive. b is a byte controlling the format:
bit 0: 0 – 8 bits, 1 – 7 bits
bit 1: 0 – no parity
bit 2: 0 – even parity, 1 – odd parity
bit 3: 0 – two stop bits, 1 – one stop bit
Further bits must be 0. Default is 0.

SET

statement
Enterprise
SET {option|n} value
Sets an option to a value. Specifying a number n instead will reach an operating system variable.

SGN

function
all
SGN(x)
Returns the signum of x, i.e. 1 for positive numbers, –1 for negative ones, and 0 for 0.


SIN

function
all
SIN(x)
Returns the sine of x radians.


SINH

function
Enterprise
SINH(x)
Return the hyperbolic sine of x.

SIZE

function
Enterprise
SIZE(array[, dim])
Returns the number of elements in the array or in its dimth dimension if specified.

SLEEP

statement
C128
SLEEP sec
Delays the program for sec seconds.

SLOW

statement
ZX81|C128
SLOW
Turns the screen off, after a FAST statement. An error, the end of the program or a NEW invokes SLOW, too.


SOUND

statement
Plus/4
SOUND voice, freq, length
Emits a sound from the voice which can be 0 or 1 for music, or 2 for white noise. freq is the frequency between 0 to 1023 and length is between 0 and 65535.
C128
SOUND voice, freq, length[, dir, m, s, w, p]
In addition to the Plus/4 version, the statement can sweep through a range of frequencies. Direction is set by dir: 0 = up, 1 = down, 2 = oscillate. m is the minimum frequency, s is the step value, w the waveform: 0 = triangle, 1 = sawtooth, 2 = variable, 3 = noise, and p is the pulse width.
Enterprise
SOUND £chan: PITCH p, DURATION d, LEFT l, RIGHT r, SOURCE so, STYLE st, ENVELOPE e, SYNC sy, INTERRUPT
Provides overall control of a sound. Parameters may be listed in any order. p (0 to 127) raises the pitch by p semitones. Default is 37 = middle c. The duration of the sound is d/50 seconds, default 50. l and r are the overall volume of the two stereo output channels, from 0 (no sound) to 255 (loudest, the default). so is the tone generator, 0 to 3 (default 0) where 3 is the noise generator. st is the style parameter (0 to 255). e is the number of envelope specified in the ENVELOPE statement; default is 255, the built-in envelope. Several sounds can be synchronized by specifying the same sy values. INTERRUPT causes the new sound to replace any sound from the same source.


SOUND BUFFER

option
Enterprise
SET SOUND BUFFER b
Sets the size of the sound envelope storage area, in phases, 1 to 255, the default is 20.

SOUND STYLE

option
Enterprise
SET SOUND STYLE s
Sets the value for the STYLE parameter in a SOUND statement. On tone channel 0: s = 16 low distortion, 32 medium distortion, 48 high distortion, 64 use high pass filter (tone channel 1 is clock), 128 ring modulation with channel 2. On tone channel 1: as channel 0, but high pass filter uses tone channel 2, ring modulator uses channel 3. On tone channel 2: as channel 0, but high pass filter uses channel 3, ring modulator uses channel 0. On channel 3 (noise channel): 1, 2, 3 use tone channel 0, 1 or 2 as clock frequency, instead of the standard 31.25 KHz frequency, 4, 8, 12 select noise frequency from 15, 11 or 9-bit polynomial counters, instead of standard 17-bit counter, 16 substitute a 7-bit polynomial counter for the 17-bit counter, 32 use low pass filter on noise channel, using tone channel 2 as clock, 64 use high pass filter on noise channel, using tone channel 0 as clock, 128 use ring modulator with tone channel 1.

SOURCE

auxiliary
Enterprise

An auxiliary keyword used for SOUND.

SPC

special_function
Commodore
SPC(x)
Returns x space characters. This function works only in the PRINT statement.


SPEAKER

option
Enterprise
SET SPEAKER {ON|OFF}
Sets the sound output on or off.

SPEEK

function
Enterprise
SPEEK(segment, address)
The same as PEEK but refers to a segment, additionally.

SPOKE

statement
Enterprise
SPOKE segment, address, value
The same as POKE but refers to a segment, additionally.

SPRCOLOR

statement
C128
SPRCOLOR m1, m2
Specifies the two colors for multicolor sprites.

SPRDEF

command
C128
SPRDEF
Starts the built-in sprite designer.

SPRITE

statement
C128
SPRITE sprite[, on][, color][, priority][, xz][, yz][, mode]
Sets parameters for a sprite. on is 0 = turns it off, 1 = turns it on. color is the foreground color. priority is 0 = sprite covers the screen contents, 1 = screen contents cover the sprite. xz and yz are the zoom in x and y directions.

SPRSAV

statement
C128
SPRSAV source, target
Copies the image of a sprite to a string or back. Both source and target can be a number, this means copying to another sprite. If target is a string variable, the image is stored in it. If source is a string variable, the sprite takes the image stored in it (only the first 63 bytes, additional content is ignored).

SQR

function
all
SQR(x)
Returns the square root of x.


SSHAPE

statement
Plus/4
SSHAPE a$, x1, y1[, x2, y2]
Stores a part of the graphic screen in the variable a$. x1, y1 are the top left corner, and x2, y2 or the graphic cursor are the bottom right corner. The shape can be later pasted back on the with GSHAPE.


ST

reserved_variable
Commodore
ST
Returns the status code of the device used last.

START

statement
Enterprise
START
If no program is loaded, loads the first program from channel 106 and runs it. If any program is loaded, runs that one.

STASH

statement
C128
STASH bytes, inaddr, bank, exaddr
Copies data from the operative memory to the extended memory. See parameters at FETCH.

STATUS

option
Enterprise
SET STATUS {ON|OFF}
Turns the status line at the top of the display on or off.

STEP

auxiliary
all

Auxiliary keyword for FOR.
Enterprise
Also an auxiliary keyword for AUTO and RENUMBER.


STOP

statement
all
STOP
Stops the execution, issuing an error message.


STR$

function
all (exceptions below)
STR$(x)
Returns x as a string, in the same format as PRINT displays it.
Enterprise
Returned string does not include any space character.


STRING

statement
Enterprise
STRING[*n] variable[*n][, ]
Declares one or more string variables with a given length of n characters (default 132). Adding *n after the keyword STRING specifies the length for all variables mentioned in the statement; specifying *n for any of them overwrites this.

STYLE

auxiliary
Enterprise

An auxiliary keyword used for SOUND.

SWAP

statement
C128
SWAP bytes, inaddr, bank, exaddr
Swaps the contents of the operative memory and the extended memory. See parameters at FETCH.

SYNC

auxiliary
Enterprise

An auxiliary keyword used for SOUND.

SYS

function
Commodore
SYS addr
Execute the machine code program from the memory address addr.
C128
SYS addr[, a][, x][, y][, s]
Same as in general Commodore, but the parameters are loaded to the accumulator, the X and Y registers, and the status register, respectively.


TAB

special_function
all
TAB(x)
Puts the cursor on the column x. This function works only in the PRINT statement.
On ZX81, x is interpreted modulo 32. Then, if column x is right from the cursor, it will move there; otherwise, it will move to the xth column of the next line.


TAN

function
all
TAN(x)
Returns the tangent of x radians.


TANH

function
Enterprise
TANH(x)
Returns the hyperbolic tangent of x.

TAPE LEVEL

option
Enterprise
SET TAPE LEVEL v
Controls the volume level for saving to tape. v is in the range 1–6•, where 1 is about 40 mV and each level is a double volume. Default •2•.

TAPE SOUND

option
Enterprise
SET TAPE SOUND {ON|OFF}
Controls transmission of sound from tape input to sound output.

TEMPO

statement
C128
TEMPO n
Sets the tempo of the PLAY statement. n can be 0 to 255, and it means a whole note length = 19.22/n seconds.

TEST

function
Simons
TEST(x, y)
Returns the state of a pixel on the graphic screen.

TEXT

statement
Simons
TEXT x, y, a$, dmode, size, i
Prints a$ on the graphic screen in zoom factor size, separating letters by i pixels; in a$, CTRL+A = uppercase mode, CTRL+B = lowercase mode.
Enterprise
TEXT [c]
Closes the standard graphics page if it was open, and opens a text page covering the entire display except the status line. c is the number of columns, 40 or 80.

THEN

auxiliary
all

Auxiliary keyword for IF.


TI

reserved_variable
Commodore
TI
Returns the number of 60th seconds elapsed since the computer was switched on.

TI$

reserved_variable
Commodore
TI$
Returns the setting of the internal clock, in the format HHMMSS. When the computer is switched on, it is 000000. It can be set with a statement TI$="040831"

TIME

statement
Enterprise
TIME time
Sets the internal clock. time is a string in the format "hh:mm:ss".

TIME$

function
Enterprise
TIME$
Returns the current time in the format "hh:mm:ss".

TIMER

option
Enterprise
SET TIMER t
Start a timer at t seconds (maximum 255) which will cause a software interrupt when it counts down to zero, then it stops. t = 0 stops the timer without causing an interrupt.

TO

auxiliary
all

Auxiliary keyword for FOR. On Plus/4, also an auxiliary keyword for BACKUP, COPY and DRAW. On C128, also an auxiliary keyword for BSAVE and CONCAT. On Enterprise, also an auxiliary keyword for CAPTURE, COPY, DELETE, DIM, DISPLAY, LIST, LLIST, REDIRECT, RENUMBER and TRACE.


TOGGLE

statement
Enterprise
TOGGLE {option|n}
Toggles a system option to the opposite state. Specifying a number n instead will reach an operating system variable. Works on options which have only an ON and OFF state.

TRACE

statement
Simons
TRACE n
If n = 10 turns tracing on: in the upper right corner it displays the numbers of the last six program lines executed.
Enterprise
TRACE {ON [TO £chan]|OFF}
When ON, sends the numbers of lines being executed to the channel chan or channel 0 if omitted.

TRAP

statement
Plus/4
TRAP [line]
Turns error catching on: any subsequent error will send execution to line line. If no line is specified, error catching is turned off.


TROFF

statement
Plus/4
TROFF
Turns TRON off.


TRON

statement
Plus/4
TRON
Turns tracking mode on. In tracking mode, the line number of each program line executed will be displayed between [] brackets.


TRUNCATE

function
Enterprise
TRUNCATE(x, n)
Cuts n decimal places from x.

TYPE

statement
Enterprise
TYPE
After asking for confirmation, exits BASIC with destroying programs and variables in memory, and starts the built-in word processor.

U

auxiliary
Plus/4

Auxiliary keyword for APPEND, BACKUP, BLOAD, BOOT, BSAVE, CATALOG, COLLECT, CONCAT, COPY, DCLEAR, DCLOSE, DIRECTORY, DLOAD, DOPEN, DSAVE, DVERIFY, HEADER, RENAME and SCRATCH.

UBOUND

function
Enterprise
UBOUND(array[, dim])
Returns the upper bound of the array in the dimth dimension or in the only one if dim is omitted.

UCASE$

function
Enterprise
UCASE$(s$)
Returns s$ converted to uppercase characters.

UNPLOT

statement
ZX81
UNPLOT x, y
Paints the screen element at coordinates x, y white. Actually, this means replacing the character there with a graphic character having one white quarter more. x must be between 0 and 63, y must be between 0 and 43.


UNTIL

statement auxiliary
Plus/4

Auxiliary keyword for DO and LOOP.
Simons
UNTIL condition
Repeats the REPEATUNTIL loop until condition turns true.


UPB

statement
Simons
UPB r1, c1, r2, c2
Scrolls a rectangle of the character screen up. From the bottom, empty space comes in.

UPW

statement
Simons
UPW r1, c1, r2, c2
Scrolls a rectangle of the character screen up. From the bottom, the contents scrolled out come in.

USE

statement
Simons
USE format$, n
Prints n in the specified format$ where the place of digits are marked #.

USR

function
Commodore|Sinclair
USR(x)
Calls a machine code program at address 784 (decimal), giving it x as a parameter. Returns a value from the machine code program.
Spectrum
USR char$
Taking a character from a to u or an UDG, returns the address of the bit pattern for that UDG character. POKEing 8 values to this address and the following 7 will redesign the UDG.
Enterprise
USR(address, x)
Calls the address, giving x to the HL register pair. Returns the value received back in HL.


VAL

function
all
VAL(a$)
Returns a numeric value stored in a$ as a string. On Sinclair, a$ may contain an expression and it will be evaluated.


VAL$

function
Spectrum
VAL$ a$
Evaluates a$ as a string expression.


VERIFY

command
Commodore
VERIFY [filename$[, device]]
Verifies a program from the specified device, comparing it to the program stored in memory. If filename$ is specified (not an empty string), the program with the appropriate name will be searched. Otherwise, the first one is compared.
Enterprise
VERIFY [£chan:]filename°


VIDEO COLOUR

option
Enterprise
SET VIDEO COLOUR v
Sets the color mode for subsequently opened video pages. On text pages, v must be 0. On high resolution graphics pages, the color modes are the following: v = 0 2 colors, horizontal resolution 640; 1 4 colors, res. 320; 2 16 colors, res. 160; 3 256 colors, res. 80. On low resolution pages, the horizontal resolution is halved. Keyword COLOR can be used instead of COLOUR.

VIDEO MODE

option
Enterprise
SET VIDEO MODE m
Sets the video mode for subsequently opened pages. m = 0 40 column text, 1 high resolution graphics, 2 80 column text, 5 low resolution graphics, 15 attribute graphics.

VIDEO X

option
Enterprise
SET VIDEO X x
Defines the horizontal size of video pages subsequently to be opened, in x character positions from 2 to 42.

VIDEO Y

option
Enterprise
SET VIDEO Y y
Defines the vertical size of video pages subsequently to be opened, in y character positions from 1 to 255.

VOL

statement
Plus/4
VOL volume
Sets the sound volume between 0 (off) to 7 (loudest).
Simons
The same, but 15 is the loudest.


WAIT

statement
Commodore
WAIT address, a[, b]
a and b are one byte long values. The computer will wait until the bits at address, compared to a and b, give appropriate values. If only a is present, the execution continues when PEEK(address) AND a <> 0 – if b is present, the execution continues when (PEEK(address) EOR b) AND a <> 0.
Enterprise
WAIT [DELAY] n
Waits for n seconds. The keyword DELAY is optional.


WAVE

statement
Simons
WAVE voice, waveform
Sets the waveform for the voice (13). waveform is an 8 digits long binary literal where the meaning of the bits are the following: 7 = white noise, 6 = square, 5 = sawtooth, 4 = triangle, 3 = testbit, 2 = modulation, 1 = synchronization, 0 = gate bit.

WHEN EXCEPTION USE

statement
Enterprise
WHEN EXCEPTION USE handler

END WHEN
Specified the exception handler to be used when an exception occurs inside the WHEN block.

WHILE

auxiliary
Plus/4

Auxiliary keyword in DO and LOOP.


WHITE

reserved_constant
Enterprise
WHITE
The color white = RGB(1, 1, 1).

WIDTH

statement
C128
WIDTH n
Sets the width of lines drawn. n can be 1 or 2.

WINDOW

statement
C128
WINDOW x1, y1, y2, y2[, clear]
Sets a logical window on the 40 or 80 column character screen. If clear is 1, the inside of the window will be cleared.

WORD$

function
Enterprise
WORD$(n)
Returns n converted to a two-byte string (first byte is least significant).

XOR

function
C128
XOR(a, b)
Returns the bitwise XOR value of a and b.

YELLOW

reserved_constant
Enterprise
YELLOW
The color yellow = RGB(1, 1, 0).

@

statement
Simons
@bits
After a DESIGN statement, describes a line of a shape. For high-resolution sprites, bits (a string literal with no " quotation marks) are 24 characters; for multicolor sprites, 12; for characters, 8. Applicable characters are: . = background color, B = foreground color, and in multicolor C and D = two additional colors (see CMOB and MOB SET).

:

separator
all, except ZX81
statement : statement
Statement separator to use several statements in the same line. On ZX81, only one statement by line is allowed.


;

separator
all
value; value
Separator to delimit parameters in some situations.


,

separator
all
value, value
Separator to delimit parameters of statements and arguments of functions.


separator
Spectrum
value value
One of the separators in the PRINT statement to put the cursor to the beginning of the next line.


+

operator
all
value + value
For numbers, addition operator. For strings, concatenation operator.


operator
all
value value
Subtraction operator. For a single value, negation operator.
For LIST (and on Enterprise, DELETE), stands between two line numbers to specify “from–to”.


*

operator
all
value * value
Multiplication operator.


/

operator
all
value / value
Division operator.


operator
Commodore|Spectrum
value value
Power operator.


**

operator
ZX81
value ** value
Power operator.


=

operator
all
value = value
1. Relational operator: true if the values are equal. 2. Assignment operator: assigns a value to a variable (variable=value), replacing the LET statement. 3. Used in some statements like FOR.


<

operator
all
value1 < value2
Relational operator: true if value1 is less than value2.


>

operator
all
value1 > value2
Relational operator: true if value1 is greater than value2.


<=

operator
all
value1 <= value2
Relational operator: true if value1 is less than or equal to value2. On most systems, can be written also =<.


>=

operator
all
value1 >= value2
Relational operator: true if value1 is greater than or equal to value2. On most systems, can be written also =>.


<>

operator
all
value1 <> value2
Relational operator: true if value1 is not equal to value2. On most systems, can be written also ><.


( )

separator
all
(values)
Enclosing separator for arguments of functions, and used in expressions.
On Sinclair, beyond the above, it is the substring marker, along with the keyword TO.
s$(a) means the ath character of s$
s$(a TO ) means the ath and following characters of s$
s$( TO b) means the first and following characters of s$, ending with the bth one
s$(a TO b) means the characters of s$ from the ath one to the bth one, inclusively
Also on the Sinclair, the ( ) parentheses aren’t required around the argument of a function if it is a single literal value or variable. If the function keyword is followed by an expression and there are no parentheses, it will be interpreted with only the first element as an argument.


"

separator
all
"string"
Enclosing separator to include literal strings. On Spectrum, two ("") are written if one " quotation mark needs to be printed inside " quotation marks.


""

symbol
ZX81
"string""string"
Serves as a replacement character for the " quotation mark inside literal strings. When printing the string, it appears as ". On ZX81, "" is a separate character, “double double quotation marks”. On Spectrum, two " quotation marks are used for this purpose.


#

symbol
Commodore
statement#lf
On the Commodore systems, in some file related statements, serves as a prefix for the logical file number lf. Actually, it is a part of the keyword itself.
On ZX81, the character itself is not available.


£

symbol
Enterprise
£chan
In input–output statements, precedes channel numbers.

$

symbol
all
name$
1. Serves as a suffix at variable names to denote string variables. 2. Serves as a suffix for function names that result in a string. Actually, it is a part of the keyword itself.
Simons
$digits
A hexadecimal constant.


%

symbol
all, except Sinclair
name%
Serves as a suffix at variable names to denote integer variables. On ZX81, the character itself is not available.
Simons
%bits
A binary constant.


&

operator
Enterprise
string&string
Concatenation operator.

!

symbol
Enterprise

An abbreviation for keyword REM.

?

symbol
all, except Sinclair


On most systems (except Sinclair) it is the abbreviation of the PRINT statement.


.

symbol
Simons

A bit marking symbol in the @ statement.

π

reserved_variable
Commodore|ZX81
π
Returns the value of π = 3.141596… Same as PI.
On Commodore and ZX81, this Greek letter is available in the character set and can be reached from the keyboard.


Sources


Kőhegyi János (editor): Ismerd meg a BASIC nyelvjárásait! [Get Acquainted with Dialects of BASIC!] Műszaki Könyvkiadó. Series:
– 1. HT–1080Z, ABC80, ZX81. 1984.
– 2. ZX Spectrum, TI–99/4A, Proper–16/A. 1985.
– 3. Commodore 64, Commodore VIC 20, Sharp PC–1500. 1986.
– 4. Commodore 16, Commodore Plus/4, Commodore 128, Videoton TV Computer. 1989.
Láng Attila D.: TV–BASIC. A tévésorozat, amely történelmet írt. [TV–BASIC. The Television Series That Wrote History.] Private digital publication, 2021.
Plenge–Szczepanowsky: Simon’s [sic!] BASIC gyakorlatok. [Simons’ BASIC Exercises.] Data Becker–Novotrade, 1984.
Rochlitz András (ed.): Commodore 128 felhasználói kézikönyv. [User Manual] Novotrade Rt., 1987.
Sági Gyula: Ismerkedés a ZX81-gyel. [Getting Acquainted with the ZX81] Műszaki Könyvkiadó, 1985.
Tory Kálmán: Commodore 16 felhasználói kézikönyv. [User Manual]
Úry László dr.: Commodore 16, Commodore 116 BASIC és felhasználói kézikönyv. [BASIC and User Manual] LSI ATSZ, 1986.
Úry László dr.: Commodore 64 BASIC felhasználói kézikönyv. [User Manual] LSI ATSZ, 1984.
Vickers, Steven: Sinclair Spectrum BASIC Programming. Sinclair Research Limited, second edition 1983.
Vickers, Steven: Sinclair ZX81 BASIC Programming. Sinclair Research Limited, second edition 1981.
Vogel, James–Scrimshaw, Nevin B.: The Commodore 64 Music Book. Birkhauser Boston, Inc.
Wiese, William M., Jr.: Commodore 128 Programming Secrets. Osborne McGraw-Hill.
–: Enterprise Programming Guide. Enterprise Computers Ltd., 1984.
Wikipedia


KEYWORDS


485: ABS   ACCESS   ACOS   ACS   ALL   ALLOCATE   AND   ANGL   ANGLE   APPEND   ARC   ASC   ASK   ASN   ASIN   AT   ATN   ATTR   ATTRIBUTE   ATTRIBUTES   AUTO   B   BACKUP   BANK   BCKGNDS   BEAM   BEEP   BEGIN   BEND   BFLASH   BIAS   BIN   BLACK   BLOAD   BLOCK   BLUE   BOOT   BORDER   BOX   BRIGHT   BSAVE   BUMP   C   CALL   CAPTURE   CAT   CATALOG   CAUSE   CEIL   CENTRE   CGOTO   CHAIN   CHAR   CHARACTER   CHECK   CHR$   CIRCLE   CLEAR   CLOSE   CLOSE#   CLR   CLS   CMD   CMOB   CODE   COLD   COLLECT   COLLISION   COLOR   COLOUR   CONCAT   CONT   CONTINUE   COPY   COS   COSH   COT   CSC   CSET   CURSOR CHARACTER   CURSOR COLOUR   CYAN   D   DATA   DATE   DATE$   DCLEAR   DCLOSE   DEC   DEF   DEFAULT CHANNEL   DEG   DEGREES   DELAY   DELETE   DESIGN   DETECT   DIM   DIR   DIRECTORY   DISABLE   DISAPA   DISK   DISPLAY   DISPLAY GRAPHICS   DISPLAY TEXT   DIV   DLOAD   DO   DOPEN   DOWNB   DOWNW   DRAW   DS   DS$   DSAVE   DUMP   DUP   DURATION   DVERIFY   EDIT   EDITOR BUFFER   EDITOR KEY   EDITOR VIDEO   EL   ELSE   END   END DEF   END HANDLER   END IF   END LOOP   END PROC   END SELECT   END WHEN   ENVELOPE   EPS   ER   ERASE   ERR$   ERRLN   ERRN   EXCEPTION   EXEC   EXIT   EXIT DEF   EXIT DO   EXIT FOR   EXIT HANDLER   EXIT IF   EXLINE   EXOR   EXP   EXSTRING$   EXT   EXTYPE   FAST   FAST SAVE   FCHR   FCOL   FETCH   FILL   FILTER   FIND   FIRST   FKEY   FLASH   FLUSH   FN   FOR   FORMAT   FP   FRAC   FRE   FREE   FROM   GET   GETKEY   GLOBAL   GO   GOSUB   GOTO   GRAPHIC   GRAPHICS   GREEN   GSHAPE   HANDLER   HEADER   HELP   HEX$   HI COL   HIRES   HRDCPY   I   IF   IF MISSING   IMAGE   IN   INF   INFO   INK   INKEY   INKEY$   INPUT   INPUT#   INSERT   INST   INSTR   INT   INTERRUPT   INTERRUPT CODE   INTERRUPT KEY   INTERRUPT NET   INTERRUPT STOP   INV   INVERSE   IP   JOY   KEY   KEY CLICK   KEY DELAY   KEY RATE   L   LAST   LBOUND   LCASE$   LEFT$   LEFTB   LEFTW   LEN   LET   LINE   LINE INPUT   LINE MODE   LINE STYLE   LIST   LLIST   LN   LOAD   LOCAL   LOCATE   LOG   LOG10   LOG2   LOOK   LOOP   LORES   LOW COL   LPRINT   LTRIM$   MAGENTA   MAX   MAXLEN   MEM   MERGE   MID$   MIN   MMOB   MOB OFF   MOB SET   MOD   MONITOR   MOVE   MOVSPR   MULTI   MUSIC   NAME   NET   NET CHANNEL   NET MACHINE   NET NUMBER   NEW   NEW ALL   NEXT   NO ERROR   NOT   NRM   NUMBER   NUMERIC   OFF   OLD   ON   ON ERROR   ON KEY   OPEN   OPEN#   OPTION   OPTION ANGLE   OR   ORD   OUT   OVER   P   PAGE   PAINT   PALETTE   PAPER   PAUSE   PEEK   PEN   PENX   PENY   PI   PING   PITCH   PLACE   PLAY   PLOT   POINT   POINTER   POKE   POS   POT   PRINT   PRINT#   PRINT USING   PROC   PROGRAM   PROMPT   PUDEF   RAD   RADIANS   RAND   RANDOMIZE   RCLR   RCOMP   RDOT   READ   REC   RECORD   RED   REDIRECT   RELEASE   REM   REM1   REM2   RENAME   RENUMBER   REPEAT   RESET   RESTORE   RESUME   RETRACE   RETRY   RETURN   RGB   RGR   RIGHT   RIGHT$   RIGHTB   RIGHTW   RLOCMOB   RLUM   RND   ROT   ROUND   RSPCOLOR   RSPPOS   RSPRITE   RTRIM$   RUN   RWINDOW   SAVE   SCALE   SCNCLR   SCRATCH   SCREEN$   SCRLD   SCRSV   SCROLL   SEC   SECURE   SELECT   SERIAL BAUD   SERIAL FORMAT   SET   SGN   SIN   SINH   SIZE   SLEEP   SLOW   SOUND   SOUND BUFFER   SOUND STYLE   SOURCE   SPC   SPEAKER   SPEEK   SPOKE   SPRCOLOR   SPRDEF   SPRITE   SPRSAV   SQR   SSHAPE   ST   START   STASH   STATUS   STEP   STOP   STR$   STRING   STYLE   SWAP   SYNC   SYS   TAB   TAN   TANH   TAPE LEVEL   TAPE SOUND   TEMPO   TEST   TEXT   THEN   TI   TI$   TIME   TIME$   TIMER   TO   TOGGLE   TRACE   TRAP   TROFF   TRON   TRUNCATE   TYPE   U   UBOUND   UCASE$   UNPLOT   UNTIL   UPB   UPW   USE   USR   VAL   VAL$   VERIFY   VIDEO COLOUR   VIDEO MODE   VIDEO X   VIDEO Y   VOL   WAIT   WAVE   WHEN EXCEPTION USE   WHILE   WHITE   WIDTH   WINDOW   WORD$   XOR   YELLOW   @   :   ;   ,   ’   +   –   *   /   ↑   **   =   <   >   <=   >=   <>   ( )   "   ""   #   £   $   %   &   !   ?   .   π

TYPES


auxiliary 48: ACCESS   ALL   AT   ATTRIBUTE   B   CLR   CODE   D   DATA   DEGREES   DELAY   DURATION   ELSE   ENVELOPE   EXCEPTION   EXIT DO   FIRST   FROM   HIRES   I   IF MISSING   INTERRUPT   L   LAST   LINE   LORES   NAME   NET   NEXT   NUMBER   OFF   ON   P   PITCH   PROMPT   RADIANS   RELEASE   RIGHT   SCREEN$   SOURCE   STEP   STYLE   SYNC   THEN   TO   U   UNTIL   WHILE
command 19: AUTO   COLD   CONT   DELETE   EDIT   HELP   LIST   LOAD   MONITOR   NEW   OLD   OPTION   PAGE   RENUMBER   RUN   SAVE   SECURE   SPRDEF   VERIFY
function 107: ABS   ACOS   ACS   ANGLE   ASC   ASN   ASIN   ATN   ATTR   BIN   BUMP   CEIL   CHECK   CHR$   CODE   COS   COSH   COT   CSC   DATE$   DEC   DEG   DIV   DUP   EPS   ERR$   EXLINE   EXOR   EXP   EXSTRING$   EXTYPE   FN   FP   FRAC   FRE   FREE   HEX$   IN   INKEY   INKEY$   INSERT   INST   INSTR   INT   IP   JOY   LBOUND   LCASE$   LEFT$   LEN   LN   LOG   LOG10   LOG2   LTRIM$   MAX   MAXLEN   MID$   MIN   MOD   ORD   PEEK   PEN   PENX   PENY   PLACE   POINT   POINTER   POS   POT   RAD   RCLR   RDOT   REM   RGB   RGR   RIGHT$   RLUM   RND   ROUND   RSPCOLOR   RSPPOS   RSPRITE   RTRIM$   RWINDOW   SCREEN$   SEC   SGN   SIN   SINH   SIZE   SPEEK   SQR   STR$   SYS   TAN   TANH   TEST   TIME$   TRUNCATE   UBOUND   UCASE$   USR   VAL   VAL$   WORD$   XOR
modifier 6: BRIGHT   FLASH   INK   INVERSE   OVER   PAPER
operator 16: AND   NOT   OR   +   –   *   /   ↑   **   =   <   >   <=   >=   <>   &
option 45: ATTRIBUTES   BEAM   BIAS   BORDER   CHARACTER   COLOUR   CURSOR CHARACTER   CURSOR COLOUR   DEFAULT CHANNEL   EDITOR BUFFER   EDITOR KEY   EDITOR VIDEO   FAST SAVE   FKEY   INK   INTERRUPT CODE   INTERRUPT KEY   INTERRUPT NET   INTERRUPT STOP   KEY CLICK   KEY DELAY   KEY RATE   LINE MODE   LINE STYLE   NET CHANNEL   NET MACHINE   NET NUMBER   PALETTE   PAPER   REM1   REM2   SCROLL   SERIAL BAUD   SERIAL FORMAT   SOUND BUFFER   SOUND STYLE   SPEAKER   STATUS   TAPE LEVEL   TAPE SOUND   TIMER   VIDEO COLOUR   VIDEO MODE   VIDEO X   VIDEO Y
reserved constant 9: BLACK   BLUE   CYAN   GREEN   INF   MAGENTA   RED   WHITE   YELLOW
reserved variable 11: DS   DS$   EL   ER   ERRLN   ERRN   PI   ST   TI   TI$   π
separator 6: :   ;   ,   ’   ( )   "
special function 4: AT   BIN   SPC   TAB
statement 233: ALLOCATE   ANGL   APPEND   ARC   ASK   BACKUP   BANK   BCKGNDS   BEEP   BEGIN   BEND   BFLASH   BLOAD   BLOCK   BOOT   BORDER   BOX   BRIGHT   BSAVE   CALL   CAPTURE   CAT   CATALOG   CAUSE   CENTRE   CGOTO   CHAIN   CHAR   CIRCLE   CLEAR   CLOSE   CLOSE#   CLR   CLS   CMD   CMOB   CODE   COLLECT   COLLISION   COLOR   COLOUR   CONCAT   CONTINUE   COPY   CSET   DATA   DATE   DCLEAR   DCLOSE   DEF   DELAY   DESIGN   DETECT   DIM   DIR   DIRECTORY   DISABLE   DISAPA   DISK   DISPLAY   DISPLAY GRAPHICS   DISPLAY TEXT   DLOAD   DO   DOPEN   DOWNB   DOWNW   DRAW   DSAVE   DUMP   DVERIFY   END   END DEF   END HANDLER   END IF   END LOOP   END PROC   END SELECT   END WHEN   ENVELOPE   ERASE   EXEC   EXIT   EXIT DEF   EXIT DO   EXIT FOR   EXIT HANDLER   EXIT IF   EXT   FAST   FCHR   FCOL   FETCH   FILL   FILTER   FIND   FLASH   FLUSH   FOR   FORMAT   GET   GETKEY   GLOBAL   GO   GOSUB   GOTO   GRAPHIC   GRAPHICS   GSHAPE   HANDLER   HEADER   HI COL   HIRES   HRDCPY   IF   IMAGE   INFO   INK   INPUT   INPUT#   INV   INVERSE   KEY   LEFTB   LEFTW   LET   LINE   LINE INPUT   LLIST   LOCAL   LOCATE   LOOK   LOOP   LOW COL   LPRINT   MEM   MERGE   MMOB   MOB OFF   MOB SET   MOVE   MOVSPR   MULTI   MUSIC   NEW ALL   NEXT   NO ERROR   NRM   NUMERIC   OFF   ON   ON ERROR   ON KEY   OPEN   OPEN#   OPTION ANGLE   OUT   OVER   PAINT   PAPER   PAUSE   PING   PLAY   PLOT   POKE   PRINT   PRINT#   PRINT USING   PROC   PROGRAM   PUDEF   RAND   RANDOMIZE   RCOMP   READ   REC   RECORD   REDIRECT   REM   RENAME   REPEAT   RESET   RESTORE   RESUME   RETRACE   RETRY   RETURN   RIGHTB   RIGHTW   RLOCMOB   ROT   SCALE   SCNCLR   SCRATCH   SCRLD   SCRSV   SCROLL   SELECT   SET   SLEEP   SLOW   SOUND   SPOKE   SPRCOLOR   SPRITE   SPRSAV   SSHAPE   START   STASH   STOP   STRING   SWAP   TEMPO   TEXT   TIME   TOGGLE   TRACE   TRAP   TROFF   TRON   TYPE   UNPLOT   UNTIL   UPB   UPW   USE   VOL   WAIT   WAVE   WHEN EXCEPTION USE   WIDTH   WINDOW   @
symbol 10: B   C   ""   #   £   $   %   !   ?   .

DIALECTS


all 46: ABS   AND   ATN   CHR$   COS   EXP   FOR   GOSUB   GOTO   INT   LEN   LOG   LOG10   LOG2   NEW   NEXT   NOT   OR   PEEK   POKE   RETURN   SGN   SIN   SQR   STEP   STOP   TAB   TAN   THEN   TO   VAL   ;   ,   +   –   *   /   =   <   >   <=   >=   <>   ( )   "   $
all (exceptions below) 10: DIM   IF   INPUT   LET   LIST   PRINT   REM   RND   RUN   STR$
all, except Sinclair 6: END   LEFT$   MID$   RIGHT$   %   ?
all, except Sinclair and Enterprise 1: ASC
all, except ZX81 4: DATA   READ   RESTORE   :
C128 42: APPEND   B   BANK   BEGIN   BEND   BLOAD   BOOT   BSAVE   BUMP   CATALOG   COLLISION   CONCAT   DCLEAR   DCLOSE   DOPEN   DVERIFY   FAST   FETCH   FILTER   MOVSPR   P   PEN   PLAY   POINTER   POT   RECORD   RSPCOLOR   RSPPOS   RSPRITE   RWINDOW   SLEEP   SLOW   SPRCOLOR   SPRDEF   SPRITE   SPRSAV   STASH   SWAP   TEMPO   WIDTH   WINDOW   XOR
Commodore 27: CLOSE   CLR   CMD   CONT   DEF   FN   FRE   GET   GO   INPUT#   LOAD   ON   OPEN   POS   PRINT#   SAVE   SPC   ST   SYS   TI   TI$   USR   VERIFY   WAIT   ↑   #   π
Enterprise 202: ACCESS   ACOS   ALL   ALLOCATE   ANGLE   ASK   ASIN   AT   ATTRIBUTE   ATTRIBUTES   AUTO   BEAM   BIAS   BIN   BLACK   BLUE   BORDER   CALL   CAPTURE   CAUSE   CEIL   CHAIN   CHARACTER   CLEAR   CLOSE   CODE   COLOR   COLOUR   CONTINUE   COPY   COSH   COT   CSC   CURSOR CHARACTER   CURSOR COLOUR   CYAN   DATE   DATE$   DEF   DEFAULT CHANNEL   DEG   DEGREES   DELAY   DELETE   DISPLAY   DISPLAY GRAPHICS   DISPLAY TEXT   DO   DURATION   EDIT   EDITOR BUFFER   EDITOR KEY   EDITOR VIDEO   END DEF   END HANDLER   END IF   END SELECT   END WHEN   ENVELOPE   EPS   EXCEPTION   EXIT DEF   EXIT DO   EXIT FOR   EXIT HANDLER   EXLINE   EXSTRING$   EXT   EXTYPE   FAST SAVE   FIRST   FKEY   FLUSH   FP   FREE   FROM   GET   GRAPHICS   GREEN   HANDLER   HEX$   HIRES   IF MISSING   IMAGE   IN   INF   INFO   INK   INTERRUPT   INTERRUPT CODE   INTERRUPT KEY   INTERRUPT NET   INTERRUPT STOP   IP   JOY   KEY CLICK   KEY DELAY   KEY RATE   LAST   LBOUND   LCASE$   LINE INPUT   LINE MODE   LINE STYLE   LLIST   LOAD   LOOK   LOOP   LORES   LPRINT   LTRIM$   MAGENTA   MAX   MAXLEN   MERGE   MIN   NAME   NET   NET CHANNEL   NET MACHINE   NET NUMBER   NEW ALL   NUMBER   NUMERIC   OFF   ON   OPEN   OPTION ANGLE   ORD   OUT   PALETTE   PAPER   PING   PITCH   PLOT   POS   PROGRAM   PROMPT   RAD   RADIANS   RANDOMIZE   READ   RED   REDIRECT   RELEASE   REM   REM1   REM2   RENUMBER   RETRY   RGB   RIGHT   ROUND   RTRIM$   SAVE   SCROLL   SEC   SELECT   SERIAL BAUD   SERIAL FORMAT   SET   SINH   SIZE   SOUND   SOUND BUFFER   SOUND STYLE   SOURCE   SPEAKER   SPEEK   SPOKE   START   STATUS   STR$   STRING   STYLE   SYNC   TANH   TAPE LEVEL   TAPE SOUND   TEXT   TIME   TIME$   TIMER   TOGGLE   TRACE   TRUNCATE   TYPE   UBOUND   UCASE$   VERIFY   VIDEO COLOUR   VIDEO MODE   VIDEO X   VIDEO Y   WAIT   WHEN EXCEPTION USE   WHITE   WORD$   YELLOW   £   &   !
Plus/4 59: AUTO   BACKUP   BOX   CHAR   CIRCLE   COLLECT   COLOR   COPY   D   DEC   DELETE   DIRECTORY   DLOAD   DO   DRAW   DS   DS$   DSAVE   EL   ELSE   ER   ERR$   EXIT   GETKEY   GRAPHIC   GSHAPE   HEADER   HELP   HEX$   I   INSTR   JOY   KEY   L   LOCATE   LOOP   MONITOR   PAINT   PRINT USING   PUDEF   RCLR   RDOT   RENAME   RENUMBER   RESUME   RGR   RLUM   SCALE   SCNCLR   SCRATCH   SOUND   SSHAPE   TRAP   TROFF   TRON   U   UNTIL   VOL   WHILE
Simons 116: ANGL   ARC   AT   AUTO   B   BCKGNDS   BFLASH   BLOCK   C   CALL   CENTRE   CGOTO   CHAR   CHECK   CIRCLE   CMOB   COLD   COLOUR   COPY   CSET   DELAY   DESIGN   DETECT   DIR   DISABLE   DISAPA   DISK   DISPLAY   DIV   DOWNB   DOWNW   DRAW   DUMP   DUP   ELSE   END LOOP   END PROC   ENVELOPE   ERRLN   ERRN   EXEC   EXIT IF   EXOR   FCHR   FCOL   FETCH   FILL   FIND   FLASH   FRAC   GLOBAL   HI COL   HIRES   HRDCPY   INKEY   INSERT   INST   INV   JOY   KEY   LEFTB   LEFTW   LINE   LOCAL   LOOP   LOW COL   MEM   MERGE   MMOB   MOB OFF   MOB SET   MOVE   MULTI   MUSIC   NO ERROR   NRM   OFF   OLD   ON ERROR   ON KEY   OPTION   OUT   PAGE   PAINT   PENX   PENY   PLACE   PLAY   PLOT   POT   PROC   RCOMP   REC   RENUMBER   REPEAT   RESET   RESUME   RETRACE   RIGHTB   RIGHTW   RLOCMOB   ROT   SCRLD   SCRSV   SECURE   TEST   TEXT   TRACE   UNTIL   UPB   UPW   USE   VOL   WAVE   @   .
Simons Enterprise 1: MOD
Sinclair 13: ACS   ASN   AT   CLEAR   CLS   CODE   COPY   LLIST   LN   LOAD   LPRINT   SAVE   USR
Sinclair Enterprise 1: INKEY$
Spectrum 35: ATTR   BEEP   BIN   BORDER   BRIGHT   CAT   CIRCLE   CLOSE#   CONTINUE   DEF   DELETE   DRAW   ERASE   FLASH   FN   FORMAT   IN   INK   INVERSE   LINE   LOAD   MERGE   MOVE   OPEN#   OUT   OVER   PAPER   PLOT   POINT   RANDOMIZE   SAVE   SCREEN$   VAL$   ’   ↑
Spectrum Enterprise 1: PI
ZX81 12: AT   CONT   FAST   PAUSE   PLOT   RAND   SCROLL   SLOW   UNPLOT   **   ""   π

TAGS


arithmetics 39: ABS   BIN   CEIL   DEG   DEGREES   DIV   EXP   FP   FRAC   HEX$   INF   INT   IP   LN   LOG   LOG10   LOG2   MAX   MIN   MOD   OPTION ANGLE   PI   RAD   RADIANS   RAND   RANDOMIZE   REM   RND   SGN   SQR   TRUNCATE   +   –   *   /   ↑   **   ( )   π
characters 1: @
clock 6: DATE   DATE$   TI   TI$   TIME$   TIMER
coding 23: AUTO   CONT   CONTINUE   DELAY   DELETE   DISAPA   FIND   FIRST   HELP   LAST   LIST   MONITOR   NEW   NEW ALL   OLD   OPTION   PAGE   PROGRAM   REM   RENUMBER   RUN   SECURE   START
colors 5: COLOR   HI COL   LOW COL   MULTI   RGB
errors 22: CAUSE   EL   ER   ERR$   ERRLN   ERRN   EXCEPTION   EXIT HANDLER   EXLINE   EXSTRING$   EXTYPE   NO ERROR   ON ERROR   OUT   RESUME   RETRACE   RETRY   TRACE   TRAP   TROFF   TRON   WHEN EXCEPTION USE
execution 46: BEGIN   BEND   CALL   CGOTO   CHAIN   DISABLE   DO   EDIT   ELSE   END   END DEF   END HANDLER   END IF   END LOOP   END PROC   END SELECT   END WHEN   EXEC   EXIT   EXIT DEF   EXIT DO   EXIT FOR   EXIT IF   FN   FOR   GO   GOSUB   GOTO   IF   LOOP   NEXT   ON   PAUSE   PROC   RCOMP   REPEAT   RETURN   SELECT   SLEEP   STOP   SYS   THEN   UNTIL   USR   WAIT   WHILE
files 20: APPEND   BLOAD   BOOT   BSAVE   CLOSE   CONCAT   COPY   DCLOSE   DIR   DIRECTORY   DLOAD   DOPEN   DSAVE   DVERIFY   MERGE   OPEN   RECORD   SCRATCH   SCRLD   SCRSV
floppy 2: BACKUP   COLLECT
graphics 50: ANGL   ARC   ATTR   ATTRIBUTE   ATTRIBUTES   B   BEAM   BLOCK   BOX   BRIGHT   C   CHAR   CIRCLE   DISPLAY GRAPHICS   DISPLAY TEXT   DRAW   FLASH   GRAPHIC   GSHAPE   HIRES   HRDCPY   INK   INVERSE   LINE   LINE MODE   LINE STYLE   LOCATE   LOOK   LORES   MULTI   OVER   PAINT   PAPER   PLOT   POINT   RCLR   RDOT   REC   RGR   RLUM   ROT   SCALE   SCNCLR   SCREEN$   SSHAPE   TEST   TEXT   UNPLOT   WIDTH   .
keyboard 14: DISPLAY   FKEY   GET   GETKEY   INKEY   INKEY$   INTERRUPT KEY   INTERRUPT STOP   KEY   KEY CLICK   KEY DELAY   KEY RATE   ON KEY   RESUME
logics 11: AND   EXOR   NOT   OR   XOR   =   <   >   <=   >=   <>
memory 15: ALLOCATE   BANK   CODE   EPS   FETCH   FRE   FREE   MEM   PEEK   POINTER   POKE   SPEEK   SPOKE   STASH   SWAP
network 6: INTERRUPT NET   NET CHANNEL   NET MACHINE   NET NUMBER   SERIAL BAUD   SERIAL FORMAT
peripherals 52: ACCESS   ALL   B   CAPTURE   CAT   CATALOG   CLOSE#   CMD   D   DCLEAR   DELETE   DISK   DS   DS$   EDITOR BUFFER   EDITOR KEY   EDITOR VIDEO   ERASE   FAST SAVE   FLUSH   FORMAT   FROM   GET   HEADER   I   IN   JOY   L   LOAD   MOVE   NAME   ON   OPEN#   OUT   P   PEN   PENX   PENY   POT   PRINT#   REDIRECT   REM1   REM2   RENAME   SAVE   ST   STEP   TAPE LEVEL   TAPE SOUND   U   VERIFY   £
printing 3: COPY   LLIST   LPRINT
screen 62: AT   BCKGNDS   BFLASH   BIAS   BLACK   BLUE   BORDER   CENTRE   CHAR   CHARACTER   CLS   COLOUR   CSET   CURSOR CHARACTER   CURSOR COLOUR   CYAN   DESIGN   DOWNB   DOWNW   FAST   FCHR   FCOL   FILL   GRAPHIC   GREEN   INV   LEFTB   LEFTW   MAGENTA   MOVE   NRM   OFF   PALETTE   POS   PRINT   PRINT USING   PUDEF   RCLR   RED   RIGHTB   RIGHTW   RLUM   RWINDOW   SCNCLR   SCRLD   SCRSV   SCROLL   SLOW   SPC   STATUS   TAB   TEXT   UPB   UPW   USE   VIDEO COLOUR   VIDEO MODE   VIDEO X   VIDEO Y   WHITE   WINDOW   YELLOW
sound 24: BEEP   DURATION   ENVELOPE   FILTER   INTERRUPT   LCASE$   MUSIC   NUMBER   PING   PITCH   PLAY   RELEASE   RIGHT   SOUND   SOUND BUFFER   SOUND STYLE   SOURCE   SPEAKER   STYLE   SYNC   TAPE SOUND   TEMPO   VOL   WAVE
sprites 18: BUMP   CHECK   CMOB   COLLISION   DETECT   MMOB   MOB OFF   MOB SET   MOVSPR   RLOCMOB   RSPCOLOR   RSPPOS   RSPRITE   SPRCOLOR   SPRDEF   SPRITE   SPRSAV   @
strings 28: ASC   CHR$   CODE   DEC   DUP   INSERT   INST   INSTR   LCASE$   LEFT$   LEN   LTRIM$   MAXLEN   MID$   ORD   PLACE   POS   RIGHT$   ROUND   RTRIM$   STR$   UCASE$   VAL   VAL$   WORD$   "   ""   &
syntax 12: TO   :   ;   ,   ’   =   ( )   #   $   %   !   ?
system 11: ASK   COLD   DEFAULT CHANNEL   EXT   INFO   INTERRUPT CODE   NET   SET   TIME   TOGGLE   TYPE
trigonometry 15: ACOS   ACS   ANGLE   ASN   ASIN   ATN   COS   COSH   COT   CSC   SEC   SIN   SINH   TAN   TANH
variables 23: CLEAR   CLR   DATA   DIM   DUMP   FETCH   GLOBAL   IF MISSING   INPUT   INPUT#   LBOUND   LET   LINE   LOCAL   NUMERIC   POINTER   PROMPT   READ   RESET   RESTORE   SIZE   STRING   UBOUND