TI BASIC (TI 99/4A)

TI BASIC is an ANSI-compliant BASIC programming language interpreter built into the 1981 Texas Instruments TI-99/4A home computer and its predecessor, the TI-99/4 (1979). TI Basic is based on Dartmouth BASIC and complies to the American National Standard for minimal Basic (ANSI X3.60-1978). Text, full screen graphics, logic operations, and recording to tape or any other file system, were supported by TI BASIC. Texas Instruments also produced TI Extended BASIC cartridge that enhanced the functionality accessible to BASIC users.

TI-BASIC
First appeared1979 (1979)
LicenseProprietary

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 or TI Mini Memory cartridge[1], 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

Unlike Microsoft BASICs, which used LEFT$, MID$, RIGHT$, and INSTR for manipulating strings, TI BASIC used the ANSI-compliant SEG$ and POS.

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:

  • CHAR Definition of graphical characters
  • CLEAR Clears the screen
  • COLOR Defines foreground- and background color for 8 characters
  • GCHAR Reads one character at a specified position from the screen
  • HCHAR Writes a character to a screen position and repeats it horizontally
  • JOYST Returns the position of the joystick
  • KEY Reads from the keyboard without echo on the screen
  • SCREEN Changes the color of the screen
  • SOUND Creates sounds (using a frequency) and noise
  • VCHAR Writes a character to a screen position and repeats it vertically

Development

Texas Instruments designed a virtual machine with a language or intermediate representation called GPL, for "Graphic Programming Language". TI BASIC was written in GPL, which is unique to the TI-99 line.[2]

Although widely blamed for the slow performance of TI-BASIC, part of the problem was that the virtual machine was stored in graphics ROM, which had a slow 8-bit interface.)[3] TI Extended BASIC improved execution speed somewhat by providing some functionality in assembly language.

gollark: Just play it by carrier pigeon mail.
gollark: I'm sorry you have to go through that.
gollark: Really, they all seem pretty bad in different ways.
gollark: I'm not sure universal healthcare is a good idea in general, but to be honest basically anything would be better than what it has.
gollark: The US's healthcare system is just insanely inefficient for no good reason.

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.