TI BASIC tokenized file

Texas Instruments (TI) is best known for its calculators (such as the programmable TI-59), but from 1979 through the mid-1980s they also produced computers for the home market. The TI 99/4A was their most popular model, but it still failed to outcompete other manufacturers' home computers such as the Commodore 64, so the company ultimately left this market after losing a good deal of money.

There were two versions of BASIC for the TI 99/4A, a "standard" one and an "Extended BASIC" with additional commands. Both were stored in tokenized form. The tokenization was compatible between the two versions, with the added commands given token values that are unused in standard BASIC, and the standard commands keeping the same token values in both versions.

Program lines consisted of a two-byte line number followed by the tokens (byte values from 128-255) and literal characters (1-127), with a null byte (0) ending the line, and a byte 255 marking the end of the file.

TI BASIC was praised for having built-in commands to do things that in most other computer models of the time required complicated PEEKs, POKEs, and CALLs, but criticized for being particularly slow even by the standards of the day; it was "doubly-interpreted", with the BASIC interpreter itself being implemented in a mid-level interpreted language called Graphics Programming Language.

A Japanese computer called the Tomy Tutor used a version of BASIC that is reported to have had the same token values as TI BASIC.

Tokens
Blank values indicate either that the token is unused or is used for something unknown.

Format documentation

 * What are tokens?
 * Message about TI BASIC format

Other links and references

 * Texas Instruments TI-99/4A
 * TI BASIC (TI 99/4A)
 * TI 99/4a BASIC as a scripting language for Windows and Mac OS X
 * TI 99/4a books (Internet Archive)