TI BASIC (TI 99 / 4A)

from Wikipedia, the free encyclopedia
TI BASIC
Hello World !” Program

TI BASIC is a BASIC dialect for home computers from Texas Instruments . It was developed on a commission from Microsoft by Bob Wallace and Bob Greenberg .

TI BASIC was built into the TI-99/4 and TI-99 / 4A computers as standard . With TI BASIC, text output, graphics, logical operations, and storage on tape , floppy disks , and access to the RS-232 interface were possible. Texas Instruments also produced the Cartridge Extended BASIC with extended functionality.

Elements of TI BASIC

instructions

In TI BASIC there can only be one statement in each line. The possibility of writing several statements in one line using :: was only available in Extended BASIC . The lack of a POKE statement is remarkable. However, this would not have made sense either, since the execution of machine programs was not officially possible due to the sandbox of the TI-99 / 4A .

Overview of commands, functions and variables of the TI BASIC
SECTION CALL SCREEN DELETE IF..THEN..ELSE NUMBER RESEQUENCE SQR
ASC CALL SOUND DIM INPUT (file) OLD RESTORE (file) STOP
ATN CALL VCHAR DISPLAY INPUT (key) ON-GOSUB RESTORE (data) STR $
BREAK CHAR EDIT INT ON-GOTO RETURN TAB
BYE CHR $ END JOYST OPEN RND TAN
CALL CHAR CLEAR EOF KEY OPTION BASE RUN TRACE
CALL CLEAR CLOSE EXP LEN POS SAVE UNBREAK
CALL COLOR COLOR FOR..TO..STEP LET PRINT (file) SCREEN UNTRACE
CALL GCHAR CONTINUE GCHAR LIST PRINT (screen) SEG $ VAL
CALL HCHAR COS GOSUB LOG RANDOMIZE SGN VCHAR
CALL JOYST DATA GOTO NEW READ SIN CALL
CALL KEY DEF HCHAR NEXT SEM SOUND -

Functions

Subroutines

Subroutines are called with a CALL statement (e.g. CALL CLEAR). There are no user-defined subroutines; this option is only offered by TI Extended BASIC . However, some subroutines are predefined:

  • CHAR Enables the definition of graphic characters
  • CLEAR Clears the screen
  • COLOR Specifies the foreground and background color for 8 characters each
  • GCHAR Reads a character from the screen at the specified position
  • HCHAR Writes a character on a screen position and repeats it horizontally
  • JOYST Query of the joystick
  • KEY Enables the keyboard to be queried without screen echoes
  • SCREEN Changes the color of the screen
  • SOUND For tones (with an indication of the frequency ) and noises
  • VCHAR Writes a character on a screen position and repeats it vertically

logic

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

Program speed

A major disadvantage of TI BASIC was that, as an interpreted and uncompiled language, it was very slow. TI BASIC was a double interpreted language because the BASIC interpreter itself was written in an interpreted bytecode language called GPL. Only the GPL interpreter was implemented in directly executable machine code.

Individual evidence

  1. Exploit by James Abbatiello, 2013
  2. See User's Reference Guide. A complete, detailed guide to using and enjoying your Texas Instruments computer. Edited by Texas Instruments Inc., Dallas, 1981, unpag.