TI BASIC (TI 99/4A)

TI BASIC is a BASIC dialect for home computer from Texas Instruments. It was developed as a commissioned work at Microsoft from Bob Wallace and Bob Greenberg.

TI BASIC was by default installed in the computers TI -99 /4 and TI-99/4A. With TI BASIC were text output, graphics, logical operations, and saving to tape, floppy disks, and access to the RS- 232 interface. Texas Instruments also produced the Extended BASIC cartridge with extended functionality.

Elements of TI BASIC

Instructions

In TI BASIC only one statement must be on each line. The ability to write multiple statements by :: into a line, it was only in the Extended BASIC. Noteworthy is the absence of a POKE statement. This would however not have been useful, as would not be by the architecture of TI-99/4A99 the executing machine programs already have been possible.

Functions

  • ABS Absolute value of a number
  • ASC Numeric ASCII value of the first character of the string
  • ATN arc tangent function
  • CHR $ Converts a number to a string with the corresponding ASCII characters to
  • COS Cosine
  • EOF query whether the end of file a file is reached
  • EXP Exponential
  • INT rounding toward negative infinity
  • LEN length of a string
  • LOG Natural logarithm
  • POS Find the position of a string in another
  • RND random number
  • SGN sign function
  • SIN Sine
  • SQR square root
  • Convert STR $ to String
  • TAN Tangent
  • VAL convert string to number

Subroutines

Subroutines are called using a CALL statement (for example CALL CLEAR). There are no user-defined subroutines, this possibility only opened in TI Extended BASIC. Some sub-programs, however, are predefined:

  • CHAR Allows the definition of graphic characters
  • CLEAR Clears the screen
  • COLOR Sets the foreground and background color for each 8 characters
  • Gchar Reads a character at the specified position from the screen
  • HCHAR Writes a character on a screen position and repeat it horizontally
  • JOYST query the joystick
  • KEY Enables interrogation of the screen keyboard without echo
  • SCREEN Changes the color of the screen
  • SOUND For tones (with the frequency) and noise
  • VCHAR Writes a character on a screen position and repeats it vertically

Logic

The missing operators AND and OR can be replaced by and *.

Program speed

A major disadvantage of TI BASIC was that it as an interpreted, not compiled language, was very slow. TI BASIC was an interpreted language twice, because the BASIC interpreter was even written in an interpreted bytecode language called GPL. Only the GPL interpreter was implemented in directly executable machine code.

776974
de