Tiny BASIC is a family of dialects of the BASIC programming language that can fit into 4 or fewer KBs of memory. Tiny BASIC was designed by Dennis Allison and the People's Computer Company (PCC) in response to the open letter published by Bill Gates complaining about users pirating Altair BASIC, which sold for $150. Tiny BASIC was intended to be a completely free version of BASIC that would run on the same early microcomputers.

Tiny BASIC was released as a specification, not an implementation, published in the September 1975 issue of the PCC newsletter. The article invited programmers to implement it on their machines and send the resulting assembly language implementation back for inclusion in a series of three planned newsletters. Li-Chen Wang, author of Palo Alto Tiny BASIC, coined the term copyleft to describe this concept. The community response was so overwhelming that the newsletter was relaunched as Dr. Dobb's Journal, the first regular periodical to focus on microcomputer software.

The small size and free source code made these implementations invaluable in the early days of microcomputers in the mid-1970s, when RAM was expensive and typical memory size was only 4 to 8 KB. While the minimal version of Microsoft's Altair BASIC would also run in 4 KB machines, it left only 790 bytes free for BASIC programs. More free space was a significant advantage of Tiny BASIC. To meet these strict size limits, Tiny BASIC dialects generally lacked a variety of features commonly found in other dialects, for instance, most versions lacked string variables, lacked floating-point math, and allowed only single-letter variable names.

Tiny BASIC implementations are still used today, for programming microcontrollers such as the Arduino.

History

Altair BASIC

thumb|right|A paper tape containing the expanded 8K version of Microsoft BASIC

The earliest microcomputers, like the MITS Altair 8800, generally had no built-in input/output (I/O) beyond front-panel switches and LED lamps. Useful work generally required the addition of an I/O expansion card and the use of some form of terminal. At the time, video-based terminals were very expensive, costing much more than the computer, so many users turned to mechanical devices like the Teletype Model 33. The Model 33, like most teleprinters of the era, included a tape punch system intended to allow operators to pre-record their messages and then play them at "high speed", faster than most individuals could type the message live. For the early microcomputers, this provided a convenient computer data storage format, allowing the users to write programs to paper tape and distribute them to other users.

The Homebrew Computer Club met for the first time in March 1975, and its members soon used the meetings to swap software on punched tape. At the June meeting, a tape containing a pre-release version of Altair BASIC disappeared. The tape was given to Steve Dompier, who passed it on to Dan Sokol, who had access to a high-speed tape punch. At the next meeting, 50 copies of Altair BASIC on paper tape appeared in a cardboard box. When Ed Roberts, founder of MITS, learned of this, he stated "Anyone who is using a stolen copy of MITS BASIC should identify himself for what he is, a thief." Bill Gates made this more formal, writing "An Open Letter to Hobbyists", complaining that "As the majority of hobbyists must be aware, most of you steal your software."

Tiny BASIC

The complaint was not well received. Among the many responses, Bob Albrecht, another Homebrew member and founder of the People's Computer Company (PCC), felt the best response would be to produce their own BASIC that was completely free to use by anyone. He approached Dennis Allison, a member of the Computer Science faculty at Stanford University, to write a specification for a version of BASIC that would fit in 2 to 3 kilobytes of memory. To aid porting, the design was based on an intermediate language (IL), an interpreter for the interpreter, which meant only a small portion of the total code had to be ported.

Allison's initial design was published in the September 1975 edition of the PCC newsletter, along with an Intel 8080 version of the IL interpreter. The article called on programmers to implement the design on their computer and send the resulting assembly language version back to the PCC. They stated their plans to publish three special newsletters containing these user-submitted versions, along with bug fixes, programs written in the new BASIC, and suggestions and enhancements. The concept gained further notice when it was republished in the January 1976 edition of the ACM Special Interest Group on Programming Languages. Submissions poured in. Among the notable early versions was Tiny BASIC Extended by Dick Whipple and John Arnold which ran in 3K of RAM, added FOR...NXT loops, and allowed a single numeric array. They avoided the use of the IL and wrote it directly in machine code, using octal. It starts with a note from Albrecht, under the penname "the dragon", suggesting that three editions would not be enough, and asked the readers if they would like to see it continue. It also reprinted the original article on Tiny BASIC from PCC, included the complete listing of Extended TB, and included a number of small BASIC programs including tips-and-tricks from Allison. Response to the first issue was so impressive that the introduction to the second issue stated they had already decided to continue publishing the new newsletter under the simplified name Dr. Dobb's Journal. Over the next several issues, additional versions of the language were published, and similar articles began appearing in other magazines like Interface Age.

Spread

[[File:Copyleft All Wrongs Reserved.png|thumb|240px|right|alt=Monospaced font reads "Tiny basic for Intel 8080, version 2.0 by Li-Chen Wang, modified and translated to Intel mnemonics by Roger Rausklob, 10 October 1976. @ Copyleft, All Wrongs Reserved."|The use of "Copyleft; All Wrongs Reserved" in 1976 Computer hobbyists would exchange paper tapes, cassettes or even retype the files from the printed listings.

Jim Warren, editor of Dr. Dobb's, wrote in the July 1976 ACM Programming Language newsletter about the motivations and methods of this successful project. He started with this: "There is a viable alternative to the problems raised by Bill Gates in his irate letter to computer hobbyists concerning 'ripping off' software. When software is free, or so inexpensive that it's easier to pay for it than to duplicate it, then it won't be 'stolen'." The Bill Gates letter was written to make software into products. The alternative method was to have an experienced professional do the overall design and then outline an implementation strategy. Knowledgeable amateurs would implement the design for a variety of computer systems. Warren predicted this strategy would be continued and expanded. A fellow Homebrew Computer Club member, Roger Rauskolb, modified and improved Wang's program and this was published in the December 1976 issue of Interface Age magazine. Roger added his name and preserved the COPYLEFT Notice.

Description

Basic concepts

Tiny BASIC was designed to use as little memory as possible, and this is reflected in the paucity of features as well as details of its interpreter system. Early microcomputers lacked the RAM and secondary storage for a BASIC compiler, which was more typical of timesharing systems.

Like most BASICs of the era, Tiny Basic was interactive with the user typing statements into a command line. As microcomputers of the era were often used with teletype machines or "dumb" terminals, direct editing of existing text was not possible and the editor instead used takeout characters, often the backslash, to indicate where the user backed up to edit existing text.

If the user typed a statement into the command line the system examined it to see if it started with a number. If it did not, the line was immediately parsed and operated on, potentially generating output via . This was known as "direct mode".

If the line was entered with a leading number, the number was converted from decimal format, like "50", and converted to a 8-bit value, in this case, hexadecimal. This number was used as an index into an array-like storage area where the rest of the line was stored in exactly the format it was typed. When the user typed into the command line the system would loop over the array, convert the line number back to decimal format, and then print out the rest of the text in the line.

When a program was present in memory and the user types in the command, the system enters "indirect mode". In this mode, a pointer is set to point to the first line of the program, for instance, 10 (). The original text for that line is then retrieved from the store and run as if the user had just typed it in direct mode. The pointer then advances to the next line and the process continues.

Formal grammar

The grammar is listed below in Backus–Naur form, almost exactly as it was specified in the Design Note. In the listing, an asterisk ("<code>*</code>") denotes zero or more of the object to its left except for the first asterisk in the definition of "<code>term</code>", which is the multiplication operator; parentheses group objects; and an epsilon ("<code>ε</code>") signifies the empty string. As is common in computer language grammar notation, the vertical bar ("<code>|</code>") distinguishes alternatives, as does their being listed on separate lines. The symbol "<code>CR</code>" denotes a carriage return (usually generated by a keyboard's "Enter" key). A BREAK from the console will interrupt execution of the program.

<!-- Note: there might be some typos in the listing, which IIRC is an exact copy of the DrD original. A correction of those errors would have to be shown with (foot)notes, so that the reader will be presented with the original text as printed in the DrD. --Wernher -->

<syntaxhighlight lang="abnf">

line ::= number statement CR | statement CR

statement ::= PRINT expr-list

IF expression relop expression THEN statement

GOTO expression

INPUT var-list

LET var = expression

GOSUB expression

RETURN

CLEAR

LIST

RUN

END

expr-list ::= (string|expression) (, (string|expression) )*

var-list ::= var (, var)*

expression ::= (+|-|ε) term ((+|-) term)*

term ::= factor ((*|/) factor)*

factor ::= var | number | (expression)

var ::= A | B | C ... | Y | Z

number ::= digit digit*

digit ::= 0 | 1 | 2 | 3 | ... | 8 | 9

relop ::= < (>|=|ε) | > (<|=|ε) | =

string ::= " ( |!|#|$ ... -|.|/|digit|: ... @|A|B|C ... |X|Y|Z)* "

</syntaxhighlight>

Note that string wasn't defined in the Design Note.

This syntax, as simple as it was, added one innovation: and could take an expression rather than just a line number, providing an assigned GOTO rather than the switch statement of the , a structure then supported in HP Time-Shared BASIC and predating . The syntax allowing statement (as opposed to just a line number to branch to) was not yet supported in Dartmouth BASIC at this time but had been introduced by Digital and copied by Microsoft.

Implementation in a virtual machine

The Design Note specified a virtual machine, in which the Tiny BASIC interpreter is itself run on a virtual machine interpreter. The designer's idea to use an application virtual machine goes back to Val Schorre (with META II, 1964) and Glennie (Syntax Machine). The choice of a virtual machine approach economized on memory space and implementation effort, although the BASIC programs run thereon were executed somewhat slowly.

Dialects that used the virtual machine included Tiny BASIC Extended, Tom Pittman's Tiny BASIC and NIBL. Other dialects such as Denver Tiny BASIC (DTB) and Palo Alto Tiny BASIC were direct interpreters. Some programmers, such as Fred Greeb with DTB, treated the IL (Interpretive Language) program as pseudocode for the algorithm to implement in assembly language; Denver Tiny BASIC did not use a virtual machine, but it did closely follow the IL program.

This is a representative excerpt from the 120-line IL program:

<syntaxhighlight lang="nasm">

S1: TST S3,'GO' ;GOTO OR GOSUB?

TST S2,'TO' ;YES...TO, OR...SUB

CALL EXPR ;GET LABEL

DONE ;ERROR IF CR NOT NEXT

XFER ;SET UP AND JUMP

S3: TST S8,'PRINT' ;PRINT.

</syntaxhighlight>

A common pattern in the program is to test for a keyword or part of a keyword, then act on that information. Each test is an assertion as to what is next in the line buffer. If the assertion fails, control jumps to a subsequent label (usually looking for a new keyword or token). Here the system advances its buffer cursor over any spaces and tests for and if it fails to find it then jumps to line . If it finds it, execution continues with the next IL command. In this case, the system next tests for , skipping to line if it fails (a test for , to see if this is instead a command). If it passes, control continues; in this case, calling an IL subroutine that starts at label , which parses an expression. In Tiny BASIC, (a computed GO TO) is as legal as and is the alternative to the ON-GOTO of larger BASIC implementations. The subroutine pushes the result of the expression onto the arithmetic stack (in this case, the line number). verifies no other text follows the expression and gives an error if it does. pops the number from the stack and transfers execution (GOes TO) the corresponding line number, if it exists.

The following table gives a partial list of the 32 commands of the virtual machine in which the first Tiny BASIC interpreter was written.

;

: If string matches the BASIC line, advance cursor over and execute the next IL instruction; if the test fails, execute the IL instruction at the label lbl

; : Execute the IL subroutine starting at ; save the IL address following the CALL on the control stack

; : Report a syntax error if after deleting leading blanks the cursor is not positioned to reach a carriage return

; : Test value at the top of the AE stack to be within range. If not, report an error. If so, attempt to position cursor at that line. If it exists, begin interpretation there; if not, report an error.

; : Continue execution of the IL at the label specified

; : Return to the IL location specified at the top of the control stack

; : Print characters from the BASIC text up to but not including the closing quotation mark

; : Print number obtained by popping the top of the expression stack

; : Insert spaces to move the print head to next zone

; : Output a CRLF to the printer

Tom Pittman, discussing the IL, says: "The TINY BASIC interpreter was designed by Dennis Allison as a recursive descent parser. Some of the elegant simplicity of this design was lost in the addition of syntactical sugar to the language but the basic form remains. The IL is especially suited to Recursive Descent parsing of TINY BASIC because of the general recursive nature of its procedures and the simplicity of the TINY BASIC tokens. The IL language is effectively optimized for the interpretation of TINY. Experience has shown that the difficulty of adding new features to the language is all out of proportion with the nature of the features. Usually it is necessary to add additional machine language subroutines to support the new features. Often the difficulty outweighs the advantages."

Deviations from the design

Defining Tiny BASIC for the Homebrew Computer Club, Pittman wrote, "Tiny BASIC is a proper subset of Dartmouth BASIC, consisting of the following statement types only: LET, PRINT, INPUT, IF, GOTO, GOSUB, RETURN, END, CLEAR, LIST, RUN. Arithmetic is in 16-bit integers only with the operators + - * / and nested parentheses. There are only the 26 single letter variable names A, B, ...Z, and no functions. There are no strings or arrays... Tiny BASIC specifies line numbers less than 256." He then went on to describe his implementation: "This language has been augmented to include the functions RND, USR, and PEEK and POKE, giving the user access to all his system components in the 6800 from the BASIC program."

Many implementers brought their own experiences with HP Time-Shared BASIC or DEC BASIC-PLUS to their designs and relaxed the formal Tiny BASIC language specification. Of the seven prominent implementations published by 1977:

  • All added some sort of random number function, typically . Though not included in the specification, a newsletter article prior to the Design Note for Tiny BASIC requested only this function.
  • All enabled to be optional and most let expressions in assignment statements contain relational operators.
  • All but 6800TB supported statement delimiters in lines, typically although TBX used and PATB used .
  • In statements, all but MINOL removed the need for expressions to contain relational operators (e.g., was valid). Implementations removed altogether or made it optional or supported it only for implied . None supported clauses.
  • Many modified to support print zones, using to go to the next zone and to not advance the cursor.
  • All but 6800TB and DTB added .
  • All but 6800TB and MINOL added a function to return memory size: TBX had , DTB and PATB had , L1B had , and NIBL had .
  • Four implementations added arrays, whether a single, undimensioned array in PATB and L1B or ensionable arrays in TBX and DTB.
  • Four implementations added the ark statement.
  • Four implementations added the loop: PATB, NIBL, and L1B offered , while TBX did not support and used the keyword to end a loop.
  • Only NIBL had any nod towards structured programming, with , despite Allison's lament in Issue 2 about problems with BASIC.

As an alternative to tokenization, to save RAM, TBX, DTB, and MINOL truncated keywords: for , for , for . The full, traditional keywords were not accepted. In contrast, PATB allowed accepted traditional keywords but also allowed any keyword to be abbreviated to its minimal unique string, with a trailing period. For instance, could be typed , although and other variations also worked. This system was retained in Level I BASIC for the TRS-80, which used PATB, and was also later found in Atari BASIC and the BASIC of various Sharp Pocket Computers.

Dialects

The most prominent dialects of Tiny BASIC were the original Design Note, Tiny BASIC Extended, Palo Alto Tiny BASIC, and 6800 Tiny BASIC. However, many other versions of Tiny BASIC existed.

List of prominent dialects

Tiny BASIC was first published in a newsletter offshoot of the People's Computer Company, a newsletter which became Dr. Dobb's Journal, a long-lived computing magazine. About ten versions were published in the magazine.

{| class="wikitable sortable"

|+ Prominent dialects of Tiny BASIC (in Dr. Dobb's Journal)

|-

! Date published !! Issue !! Dialect !! Author !! Processor !! Size

|-

| style="text-align:right;" | December 1975 || style="text-align:right;" | 1 || Design Note || Dennis Allison || ||

|-

| style="text-align:right;" | February 1976 || style="text-align:right;" | 2 || 6800 Tiny BASIC (6800TB) || Tom Pittman || 6800 || style="text-align:right;" | 2K

|-

| style="text-align:right;" | April 1976 || style="text-align:right;" | 4 || Palo Alto Tiny BASIC (PATB) || Li-Chen Wang || 8080 || style="text-align:right;" | 1.77K

|-

| style="text-align:right;" | November 1976 || style="text-align:right;" | 10 || National Industrial Basic Language (NIBL) || Mark Alexander & Steve Leininger || SC/MP || style="text-align:right;" | 4K

|-

| style="text-align:right;" | October 1980 || style="text-align:right;" | 49 || Enhanced 6800 Tiny BASIC || Robert Hudson || 6800 ||

|-

| style="text-align:right;" | February 1985 || style="text-align:right;" | 100 || TBI68K || Gordon Brandly || 68000 ||

|-

| style="text-align:right;" | January 2006 || style="text-align:right;" | 351 || Return of Tiny BASIC || Tom Pittman || (C) ||

|}

TBX was also known as Texas Tiny BASIC.

Both SCELBAL and 6800 Tiny BASIC were announced in the magazine but did not publish their source code.

Palo Alto Tiny BASIC

One of the most popular of the many versions of Tiny BASIC was Palo Alto Tiny BASIC, or PATB for short, by Li-Chen Wang. PATB first appeared in the May 1976 edition of Dr. Dobbs, written in a custom assembly language with non-standard mnemonics. This led to further ports that worked with conventional assemblers on the 8080. Tiny BASIC was not distributed under any formal form of copyleft distribution terms, but was presented in a context where source code was being shared and modified. In fact, Wang had earlier contributed edits to Tiny BASIC Extended before writing his own interpreter.

One of the most notable changes in PATB is the addition of the FOR...NEXT loop. In the original TB, loops could only be implemented using and . As in Microsoft BASIC, the upper and lower bounds of the loop were set on loop entry, and did not change during the loop, so if one of the bounds was based on a variable expression; changing the variable did not change the bound. The modifier was optional, as in MS.

He later adapted the language into 3K Control Basic for Cromemco, adding variable names of the form letter-digit (e.g., <code>A0</code> to <code>Z9</code>), logic functions (<code>AND()</code>, <code>OR()</code>, <code>XOR()</code>), a <code>CALL</code> command to execute machine language routines, more <code>PRINT</code>-formatting options, and others (<code>GET()</code> and <code>PUT()</code> instead of <code>PEEK</code> and <code>POKE</code>; I/O port functions).

Palo Alto Tiny BASIC was adapted for many other implementations, including Level I BASIC (1977), BASIC for the Sharp PC-1211 pocket computer (1980), and Astro BASIC (1982, by Jamie Fenton).

MINOL

Written by a junior in high school, MINOL was the only implementation that didn't support the full Design Note, lacking operator precedence, having only three relational operators (<, =, #), omitting and .

It only supported unsigned 8-bit precision (in contrast to signed 16-bit precision for every other implementation) and line numbers from 0 to 254.

No spaces were permitted except in strings; returns a random number, before an expression loads a string at that address; returns to operating system. Memory was addressable as if it were a two-dimensioned array of high and low bytes (e.g., "(0,0)" to "(255,255)"); executes a machine language subroutine.

Thomas F. Waitman wrote a Tiny BASIC in 1976 for the Hewlett-Packard HP-2640 and HP-2645 terminals (which used the Intel 8008 and 8080 processors), which was published in the Hewlett-Packard Journal.

Published in the December 1976 issue of Interface Age was LLL (Lawrence Livermore Laboratory) BASIC, the first draft of which was developed by Steve Leininger from Allison's specification before Leininger left National Semiconductor for Tandy Corporation. The final interpreter was developed by John Dickenson, Jerry Barber, and John Teeter at the University of Idaho on a contract with LLL. Taking 5K, it included a floating-point package, developed by David Mead, Hal Brand, and Frank Olken. The program was placed into the public domain by LLL, which developed the system under the auspices of the

U.S. Energy Research and Development Administration.

4K BASICs

Altair BASIC, 4K BASIC, could run within a 4&nbsp;KB RAM machine, leaving only about 790 bytes free for program code. The Tiny BASIC initiative started in response to the $150 charge for Altair 4K BASIC.

In 1975, Steve Wozniak joined the newly formed Homebrew Computer Club, which had fellow members Li-Chen Wang (Palo Alto Tiny BASIC) and Tom Pittman (6800 Tiny BASIC). Wozniak concluded that his machine would have to have a BASIC of its own, which would, hopefully, be the first for the MOS Technology 6502 processor. As the language needed 4&nbsp;KB RAM, he made that the minimum memory for the design. Integer BASIC was originally published on Compact Cassette in 1976.

In 1977, Radio Shack (as it was known then) released their first computer, the TRS-80, a Z80 system with Level I BASIC in a 4&nbsp;KB ROM. Tandy-employee Steve Leininger had written the first draft of the NIBL (National Industrial Basic Language) interpreter for the SC/MP while employed at National Semiconductor.

Originally developed in 1979, Sinclair 4K BASIC, written by John Grant, used as its language definition the 1978 American National Standards Institute (ANSI) Minimal BASIC standard, but was itself an incomplete 4&nbsp;KB implementation with integer arithmetic only.

Microcontroller dialects

Tiny BASIC implementations have been adapted for processor control and for microcontrollers such as the Arduino:

  • Stephen A. Ness wrote XYBASIC for the Mark Williams Company in 1977, a 4K integer implementation. The language was often used for process control applications.
  • Arduino BASIC – adapted from Gordon Brandly's 68000 Tiny BASIC, ported to C by Mike Field.
  • TinyBasic Plus – adapted from Arduino BASIC by Scott Lawrence.
  • Half-Byte Tiny Basic – adapted from Arduino BASIC.
  • Tiny Basic on the micro:bit – adapted from Palo Alto Tiny BASIC.

Later implementations

In 2002, Emmanuel Chailloux, Pascal Manoury and Bruno Pagano published a Tiny BASIC (lacking /) in Developing Applications with Objective Caml as an example Objective Caml application.

In 2013, Alex Yang published an implementation in Python.

In 2019, Sergey Kuznetsov published a version in Ruby.

Also in 2019, Oscar Toledo Gutierrez published bootBASIC, which fits in the of the boot sector of an 8086/8088 machine, making it the smallest BASIC implementation yet. To accomplish this, the language drops relational operators ( statements work on nonzero values), limits lines of code to 19 characters or less, and doesn't update the display when backspace is pressed. Additionally, it lacks GOSUB and RETURN but does include a RND function (without arguments, returning a value between 0 and 255). The language uses an array to store program lines, requiring to do so.

In 2023, Gordon Henderson published a Tiny Basic implementation in 6502 assembler. It is influenced by NIBL and can run in as little as of ROM requiring at least of RAM for data and program storage. It supports simple strings and memory (byte or 16-bit word), with facilities for hexadecimal input and output.

Dialects compared

The following table compares the language feature of Tiny BASIC implementations against other prominent BASICs that preceded them.

<div style="overflow-x: auto;">

{| class="wikitable sortable sort-under col4center"

|+ style="text-align: left;" | Comparison of BASIC Implementations – Tiny BASICs and Other BASICs

|-

!

! Dialect

! Programmer(s) !! Processor !! Type !! INPUT !! LET !! PRINT !! GOTO !! IF ...THEN !! GOSUB !! RETURN !! END !! RUN !! LIST !! CLEAR !! NEW !! REM !! FOR/NEXT !! READ / DATA / RESTORE !! Added BASIC commands !! Customizations !! Expressions !! relop !! Functions !! RND !! Memory Function !! Line numbers !! Statement delimiter !! Errors !! Precision !! Arithmetic !! Variables !! Arrays !! Strings

|-

!

!

| (Dartmouth students) || GE-225 || Compile-and-go || [!] || LET var = expression || PRINT expr-list { , / ; / } || GO TO number || IF expression relop expression THEN line-number || GOSUB number || RETURN || END || RUN || LIST—start || || NEW [prompts for program name] || REM || FOR / TO / STEP / NEXT || READ, DATA || STOP || || precedence, ^ || < <= = >= > <> || INT, SIN, COS, TAN, ATN, EXP, LOG, ABS, SQR, DEF FN || RND(0) 0..1 || || 1 to 99999 || || 22 defined || 9 digits || ±999,999,999; E notation base 2 -256 to +255 (E±76). || A–Z, A0–Z9 || DIM (one letter name, two dimensions); if omitted, assumed to go from 0 to 10; up to 1500 elements across all arrays || (added in version 4)

|-

!

!

| (DEC staff) || PDP-8 || Compile-and-go || INPUT var-list || LET var = expression || PRINT expr-list { , / ; / } || GO TO number || IF expression relop expression [THEN/GO TO] line-number || GOSUB number || RETURN || END || RUN || LIST (first (, last)) || || NEW [prompts for program name] || REM || FOR / TO / STEP / NEXT || READ, DATA, RESTORE || STOP, OLD, SAVE, UNSAVE || DELETE (first (, last)), BYE || precedence, ^ || < <= = >= > <> || INT, SGN, SIN, COS, TAN, ATN, EXP, LOG, ABS, SQR, DEF FN || RND(0) 0..1 || || 1 to 2045 || || 23 defined || || ±134,217,727; 14E-38<N<1.7E38 || A–Z, AA–Z9 || DIM (one letter name, two dimensions) ||

|-

!

!

| Alfred Weaver, Michael Tindall, Ronald Danielson || 8008 || Interpreter || INPUT <variable> {, <variable>}* || LET var = formula || PRINT <string> / <formula> {, <string> / <formula>}* || GO TO number || IF expression THEN line-number || GOSUB number || RETURN || END || RUN || || || || REM || FOR / TO / STEP / NEXT || || DEF FN, STOP || || precedence, ^ || < <= = >= > # AND OR NOT || FNA..Z, SIN, COS, LOG, SQR, EXP, ATN || || || 0 to 999 || || || 4-byte mantissa and 1-byte exponent [Datapoint 2200 floating-point arithmetic package] || || A–Z, A0–Z9 || DIM (one letter name, three dimensions) ||

|-

!

!

| Bill Gates, Paul Allen, Monte Davidoff || 8080 || Interpreter || INPUT ("string",) var-list || (LET) var = expression || PRINT expr-list { , / ; } || GOTO number || IF expression THEN line-number/statement || GOSUB number || RETURN || END || RUN || LIST (start) || || NEW || REM || FOR / TO / STEP / NEXT || READ, DATA, RESTORE || STOP || || precedence || < <= = >= > <> || ABS, INT, SGN, SQR, TAB, USR || RND(X) <0, new using X as seed; =0, repeat; >0, next || || 1 to 65535 || : || 12 defined || 40-bit operand floating || || || DIM (one dimension) ||

|-

!

!

| Dennis Allison || || Interpreter || INPUT var-list || LET var = expression || PRINT expr-list || GOTO expression || IF expression relop expression THEN statement || GOSUB expression || RETURN || END || RUN || LIST || [eq. to NEW] || || || || || || || precedence || < <= = >= > <> >< || || || || 1 to 255 || || 8 defined || 16-bit || ± 32767 || A–Z || ||

|-

!

!

| Dick Whipple & John Arnold || 8080 || Interpreter || IN || (LET) var = expression || PR expr-list {,|;} || GO TO || IF expression [no THEN] statement || GO SUB || RET || END || RUN || LST (first (, last)) || || NEW || || FOR-NXT (no STEP) || DTA (array LET) || || || precedence || < <= = >= > <> >< || TB() spaces in print || RN (random 0–10000) || SZE || 1 to 65535 || $ || 14 defined || 16-bit || ± 32767 || A–Z || DIM, 1- or 2-dimensions, 255x255 max ||

|-

!

!

| Fred Greeb || 8080 || Interpreter || IN || (LET) var = expression || PR expr-list {,|;} || GOTO || IF expression [no THEN] statement || GOSUB || RET || END || RUN || LIST (first last) || [eq. to NEW] || || || || || TAPE [SAVE], LOAD || CLRS [CLS] || precedence || < <= = >= > <> >< || || RND(0), RND(1) || SIZE || 2 to 255 || : || 20 defined || 16-bit || ± 32767 || A–Z, A1 to A6 to Z6 || DIM, 1 dimension ||

|-

!

!

| Eric T. Mueller || 8080 || Interpreter || IN || || }|| [ jumps back to start of direct statement] || || || || END || RUN || LIST || CLEAR [only variables] || NEW || || || || || || || < = # || |||| || 1 to 254 || : || 6 defined || 8-bit || 0 to 255 || A–Z || (H,L) memory location || single char

|-

!

!

| Li-Chen Wang || 8080 || Interpreter || INPUT [(expression) var]* || (LET) var = expression || PRINT expr-list || GOTO expression || IF expression [no THEN] statement || GOSUB expression || RETURN || STOP || RUN || LIST (start) || || NEW || REM || FOR / TO / STEP / NEXT || || STOP || || precedence || < <= = >= > # || ABS() || RND() || SIZE || 1 to 32767 || ; || 3 defined || 16-bit || ± 32767 || A–Z || @(1 array of 1 dimension) ||

|-

!

!

| Mark Alexander & Steve Leininger || SC/MP || Interpreter || INPUT ($)var || (LET) var = expression || PR/PRINT expr-list || GOTO expression || IF expression (THEN) statement || GOSUB expression || RETURN || END || RUN || LIST (start) || CLEAR [variables & stack] || NEW || REM || FOR / TO / STEP / NEXT || || DO/UNTIL || Memory addressing (@ [PEEK/POKE], STAT, PAGE) || precedence || < <= = >= > <> || MOD(), AND, OR, NOT, || RND(A,Z) || TOP || 0 to 32767 || : || 13 four-char defined || 16-bit || ± 32767 || A–Z || memory addressing ||

|-

!

!

| Steve Leininger || Z80 || Interpreter || INPUT (#digit) [(expression) var]* || (LET) var = expression || PRINT (#digit) expr-list || GOTO number || IF expression THEN statement || GOSUB number || RETURN || END || RUN (start) || LIST (start) || || NEW || REM || FOR / TO / STEP / NEXT || READ, DATA, RESTORE || STOP, CONT, ON-GOTO/GOSUB || CLOAD, CSAVE, CLS, SET, RESET || precedence || < <= = >= > <> >< || ABS(), INT(), MEM, POINT(X,Y) || RND() || MEM || 1 to 32767 || : || 3 defined || 16-bit || ± 32767 || A–Z || A(1 array of 1 dimension) ||

|-

!

!

| Robert Uiterwyk || 6800 || Interpreter || INPUT var-list || (LET) var = expression || PRINT expr-list { , / ; } || GOTO expression || IF expression relop expression THEN statement || GOSUB expression || RETURN || END || RUN || LIST (first (, last)) || || NEW || || FOR/TO/NEXT (no STEP) || || TAB() || || precedence || < <= = >= > <> >< || RND, SIZE || RND [returns 1-32762] || SIZE (statement that prints bytes used and bytes free) || 1 to 65535 || || 17 defined || 16-bit [later BCD!] || ± 32767 || A–Z || DIM (two dimensions, max size of 255) ||

|-

!

!

| Steve Wozniak || 6502 || Interpreter || INPUT ("string",) var-list || (LET) var = expression || PRINT expr-list { , / ; } || GOTO expression || IF expression relop expression THEN line-number/statement || GOSUB expression || RETURN || END || RUN (start) || LIST (first (, last)) || || SCR || REM || FOR / TO / STEP / NEXT || || AUTO, DEL, POKE || TAB (command), CALL || precedence || < <= = >= > <> # AND OR NOT MOD || SGN, ABS, PEEK(), LEN() || RND(X) 0..X (or X..0!) || HIMEM, LOMEM || 1 to 32767 || [early version, then :] || 16 defined || 16-bit || ± 32767 || A–Z followed by any number of alphanumeric || DIM (one dimension) || dimensioned

|-

!

!

| (University of Idaho staff) || 8080 || Interpreter || INPUT var-list || (LET) var = expression || PRINT expr-list { , / ;} || GO TO number || IF expression relop expression (THEN) statement || GO SUB number || RETURN || END || RUN || LIST || || SCR || REM || FOR/TO/NEXT (no STEP) || || STOP || CALL, GET(), PUT() || precedence || < <= = >= > <> >< || || || || 0 to 32767 || : || 14 defined || 32-bit operand floating point || || A–Z, A0–Z9 || DIM (integers only, one letter name, one dimension, max size of 255) ||

|-

!

!

|John Grant|| Z-80 || Interpreter || INPUT var || LET var = expression || PRINT expr-list { , / ;} || GO TO number || IF expression THEN statement || GO SUB number || RETURN || || RUN (number) || LIST || CLEAR || NEW || REM || FOR/TO/NEXT (no STEP) || || STOP || POKE || precedence || < = > || ABS, CHR$, CODE, PEEK, RND, STR$, TL$, USR || RND, RANDOMISE || || 1 to 9999 || || 10 defined || 16-bit integer || 16-bit integer || A–Z followed by any number of alphanumeric || DIM A-Z (integers only, one letter name, one dimension, max size of 255) || A$-Z$

|}

</div>

See also

  • BASIC interpreter
  • Copyleft
  • Dartmouth BASIC

Notes

References

Citations

Bibliography

  • Tiny Basic User Manual and Experimenter's Kit &ndash; by Tom Pittman
  • Robert Uiterwyk's BASIC and Robert Uiterwyk's Micro Basic &ndash; A MC6800 tiny BASIC later sold with the SWTPC 6800 computer
  • MINOL &ndash; Erik Mueller's MINOL &ndash; Tiny BASIC with strings for Intel 8080
  • Tiny BASIC &ndash; A version for the curses character screen handling library
  • tinyBasic &ndash; An implementation written in iziBasic
  • Tiny BASIC &ndash; A live web version, ported to Run BASIC from iziBasic
  • Palo Alto BASIC less than in 500 lines &ndash; Example BASIC interpreter written in Ruby.
  • TinyBasic &ndash; A port of Tom Pittman's TinyBasic C interpreter to Java, C# and Adobe Flex. Includes live web versions.
  • TinyBASIC Windows &ndash; A Windows version of TinyBASIC
  • Category:Tiny BASIC Tasks implemented in Tiny BASIC on rosettacode.org
  • Category:Palo Alto Tiny BASIC Tasks implemented in Palo Alto Tiny BASIC on rosettacode.org