TI BASIC (TI 99/4A)

This article is about TI-99/4A programming language. For the calculator language, see TI-BASIC.
TI-BASIC
First appeared 1979 (1979)
License Proprietary

TI BASIC was a dialect of BASIC for the Texas Instruments TI-99/4 Home Computer (1979), developed under contract to Microsoft by Bob Wallace and Bob Greenberg. A version supporting compiled code was also used as a commercial development language for the TI-990 range of minicomputers.

TI BASIC was built into the 99/4 and 99/4A, and was remarkably easy to learn. Users could access functions through this simple language that on other computers would only be available to those versed in the machines' assembly language code. Text, full screen graphics, logic operations, and recording to tape (or any other file system - diskettes, RS-232 interface, RAM disks) could all be accomplished using TI BASIC. TI also produced an Extended BASIC cartridge that greatly enhanced the functionality accessible to BASIC users.

Elements of TI BASIC

Statements

The statements of TI BASIC are CALL, CLOSE, DATA, DEF, DIM, DISPLAY, END, FOR..TO..STEP, GOSUB, GOTO, IF..THEN..ELSE, INPUT, LET, NEXT, ON..GOSUB, ON..GOTO, OPEN, OPTION BASE, PRINT, RANDOMIZE, READ, REM, RESTORE, RETURN, STOP

Every line of TI BASIC can only contain one statement. The possibility to put several statements in a line with :: and also the necessary PEEK and LOAD calls to use assembly language routines became available in TI Extended BASIC. Note that there is no POKE statement in TI BASIC. Loading and executing machine code requires a 32K memory expansion and the TI Editor/Assembler cartridge, which then gives access CALL LOAD. The 256 Bytes of RAM directly accessible by the CPU was mostly consumed by the BASIC interpreter. TI BASIC stored and ran programs from the 16K video RAM, and, unlike TI Extended BASIC, could not take advantage of the 32K memory expansion.

Functions

Subprograms

Subprograms are called with CALL statement (e.g. CALL CLEAR). There are no user defined subprograms (this is possible in TI Extended BASIC), but some subprograms are predefined:

Execution speed

One serious shortcoming of TI BASIC was that, as an interpreted rather than compiled language, it was inherently slow. TI BASIC was a double interpreted language, as the BASIC interpreter was itself written in a mid-layer interpreted byte-code language known as Graphics Programming Language (GPL), which was unique to the TI Home Computer.

TI Extended BASIC improved execution speed somewhat by providing some functionality in assembly language.

This article is issued from Wikipedia - version of the 11/22/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.