TI-Basic is the built-in programming language on all of TI's graphing calculators. It is a scripting language, which means that it is interpreted and executed one token or instruction at a time as it runs. Conversely, a compiled language is fully converted into machine language before it runs, so it generally runs much faster. TI-Basic is called such for the similarity between the dialect of the language and various versions of BASIC. TI does not officially call this language TI-Basic, but it is widely accepted across the Internet and within the TI community itself.
TI-Basic is extremely simple to learn and use, as most of the commands are written in plain English or easily comprehended abbreviations, and are generally self-explanatory. For example, it is not very hard to recognize that the Pause command pauses a program. You can create TI-Basic programs on the computer using the TI-Graph Link or TI Connect software, or on the calculator itself through the program editor. When an error is encountered in TI-Basic, the calculator gives the user the option to go to the problem, which makes debugging much easier.
Because TI-Basic code is read and acted on as it is executed, it loses much of its speed; doing anything involving calculations or graphics can be painfully slow. Really, the speed of TI-Basic comes nowhere close to the speed of assembly. You just need to play an assembly game (such as Super Mario or Phoenix) to see the great difference in speed. TI-Basic also does not have low-level access to the calculator's hardware. While this is intentionally done to prevent potential misuse, it has the result of limiting the quality of TI-Basic programs.
The TI-Basic community is like other programming communities, in that it has a shared terminology that its members use. There are a few terms that have become especially ubiquitous within the community: advanced Basic, quality TI-Basic programming; memory leak, improper exiting of a loop or conditional with a Goto; and spaghetti code, code that heavily relies on Goto/Lbl for its structure and organization. It should be noted that these terms primarily apply to TI-83/84 Basic, as that is the most popular variant of TI-Basic used.
(For more on TI-Basic, visit TI-Basic Developer.)
Showcases of TI-Basic
Although TI-Basic often gets a bad rap for being so limited compared to assembly, there have been several TI-Basic programmers and programming groups that have released notable programs that show that TI-Basic can be used to create quality programs:
- SiCoDe Software was the most well-known TI-Basic programming group, creating several quality TI-Basic games as well as a series of well-written tutorials that teach advanced Basic programming techniques.
- Destination Software was known for their Final Fantasy Destination RPG, which even won the prestigious Program of the Month (POTM) award that was handed out by ticalc.org.
- Arthur O'Dwyer was influential in creating several quality proof-of-concept games using TI-Basic, in addition to his seminal The Complete TI-83 Basic Optimization Guide that provides an in-depth look at the ins and outs of TI-Basic optimization.
- Kenneth Hammond (Weregoose) is renowned in the TI-Basic community for his optimization prowess, as he is able to come up with remarkable optimizations for almost any situation.
- Kevin Ouellet (DJ_Omnimaga) is known in the TI-Basic community for creating quality RPGs using assembly libraries for assistance. Some of his games, such as Reign of Legends and Reuben Quest, provide several hours of gameplay and complex storylines.
- Hitoshi Koizumi (Programmerman) created multiple full-length RPGs in TI-Basic using assembly assistance, including Tales of Magic, Pokemon vs Digimon, and Stardust.
There are simply too many notable TI-Basic programmers to list all of their achievements and contributions to the TI-Basic community on this page, so here is a list of the individual TI-Basic programmer pages that you can visit to read more about each of them and what they they are known for:
Although TI-Basic is built-in to all of the TI graphing calculators, each graphing calculator has its own variant, with a uniquely specific combination of syntax, commands and functions, and features and functionality. Even the TI-83/84 series, which were intentionally designed to be similar to allow for backwards compatibility, are not exactly the same, as new commands, characters, and undocumented functionality has been added with each new calculator and ROM update. For example, the TI-84+ and TI-84+SE calculators introduced several new commands, some of which use the new built-in clock, while others are used for formatting times and dates.
TI-Basic on the 68k calculators is also similar, and it is much more powerful than TI-83/84 Basic. It not only provides support for calculus, but also has indirection, local variables and functions, custom variable names, advanced picture manipulation, and several other features that make it a very rich language. Along with the discontinued TI-85/TI-86 calculators and the currently supported TI-Nspire series, it also uses a different approach of allowing commands and functions to be entered letter by letter without requiring them to be chosen from a menu.
When a program is first executed or opened in the program editor, there is a noticeable delay as the calculator is parsing the program and tokenizing it. Each command, function, or variable is internally represented as a token, which is quicker and simpler to interpret during execution. This means that the calculator does not store a command such as "cos(" as the individual characters 'c', 'o', 's', and '(', but instead stores a single number that it will later translate as "cos(" when necessary. On the TI-83+/84+ and lower calculator models, programs are essentially tokenized during entry, where cursor movement, menu selections, and editing commands always operate on each group of characters that make up an individual token.
Programming TI-Basic on the Nspire is especially difficult, as TI has changed much of the language to prevent programmer misuse. The most notable change is in the input and output, as the home screen and graph screen have completely been removed, and thus there is no way to display text or graphics. The calculator also puts rigid constraints on program execution, so a program can't be interrupted by a user until the calculator has finished executing a command or operation. Everything is also stored as documents, problems, and pages, which is quite clunky and cumbersome when attempting to make programs of any notable size. Simply put, the TI-Nspire was not designed for programming, so get another calculator if you want that ability.
Only TI-83/84 Basic has gained widespread support and adoption, however, primarily because the TI-83/84 series has been heavily marketed by Texas Instruments to high schools students needing a graphing calculator for math and science classes. TI-Basic on the 68k and Nspire isn't used nearly as much as TI-83/84 Basic — in fact, TI-Nspire Basic is still relatively unknown to the TI community, as there hasn't been much documentation written — so there isn't much of a community developed around it. Unfortunately, there will probably never be much community support for it, simply due to the competition from other languages that are available (in particular, assembly and C, and most recently Lua on the Nspire).
The TI-Basic Community
Because TI-Basic is readily accessible due to it being built-in to the TI graphing calculators and using straightforward syntax and commands, it allows almost anybody with a TI graphing calculator to write their own programs. In fact, TI-Basic is the first exposure that many people have to programming. This has resulted in a large variety of TI-Basic programs being released, including math, science, utilities, graphics, and games; the major TI sites, such as ticalc.org, calc.org, and TI-Files, used to be literally flooded with TI-Basic programs, with upwards of 50+ TI-Basic programs being uploaded each day.
:Disp "YOU PRESSED MATH"
:Dsp "YOU PRESSED APPS"
:If V≠41 or 42
|Sample TI-Basic Code|
Unfortunately, most of the people that write and release TI-Basic programs are not particularly skilled at programming; and thus most of the programs are poor quality, featuring crappy coding, gameplay, and graphics, and are simply not worth downloading. There have also been many duplicate TI-Basic programs released over the years. For example, there are over 100 quadratic solvers available for the TI-83+/84+ on ticalc.org, even though there is just one quadratic formula. This has made locating quality TI-Basic programs rather difficult, and also greatly tarnished the reputation of TI-Basic within the TI community.
The general attitude held by many people in the TI community is that TI-Basic programs are inferior to and of lower quality than their assembly counterparts, and this has resulted in some very heated arguments and fighting between TI-Basic and assembly programmers. One notable example is the comments section on ticalc.org for the news article featuring SiCoDe Software's Nibbles Arcade. When some assembly programmers questioned why the program was featured, as it was "just" another TI-Basic program, the discussion descended into a full-fledged debate about TI-Basic versus assembly, with even Nick Disabato of ticalc.org getting involved.
Consequently, the TI community often discriminates against TI-Basic programmers and programs. If you compare the amount of assembly programs to TI-Basic programs featured on ticalc.org, for example, the difference is quite noticeable and striking. Basically any new assembly program released gets featured, while only the most revolutionary and innovative TI-Basic programs get featured. In addition, it often requires significant pressure from the TI-Basic community, with multiple people emailing the ticalc.org news staff and requesting a news article.
There have been various attempts by members of the TI-Basic community to try to counteract that stigma and reputation. The general pattern that each attempt has taken is forming a smaller conglomerate made up of individual TI-Basic programmers and programming groups. Each conglomerate functioned as an alliance between the better TI-Basic programmers, with all of the members' programs released under that one banner to ensure the value and recognition of their programs remained high. The individual members also posted the alliance badge on their site, which told people that they were affiliated with that alliance.
The theory is that people would know if a program was released by the alliance, then it was worth downloading to your calculator. None of the alliances were very effective, unfortunately, as they were run loosely with minimal control and oversight, and were eventually discontinued. In fact, only The BASIC Elite had a test to assess the TI-Basic knowledge and skill of each person requesting membership, as a person had to submit to an interview and present one of their programs for review. The alliances also struggled to get the better TI-Basic programmers to join, and there wasn't a noticeable increase in the downloading of their TI-Basic programs.
Besides the TI-Basic Quality Alliance (TBQA), SiCoDe Software also started their own attempt at getting more respect for TI-Basic programmers and programs called the Basmic Campaign. The word Basmic is a combination of "basic" and "asm" (a common abbreviation for assembly), which was purposely chosen to reflect that TI-Basic can be used to create quality programs that are efficiently programmed and fun to play. The Basmic Campaign got support from several TI community members, but it too was not very effective, as people never seemed to get past the TI-Basic versus assembly debates, and it was eventually discontinued.
Due to the speed and hardware restrictions built-in to TI-Basic, there have been multiple attempts over the years by people in the TI community to enhance the language to make it more capable of creating quality programs. In particular, this has taken the form of creating alternative languages to simply try to replace TI-Basic altogether, or creating assembly utility programs that work alongside of TI-Basic to provide features and functionality that is normally lacking in TI-Basic.
The alternative languages all use a modified form of the TI-Basic syntax to make the learning curve easier for users, and the most popular alternatives have been: Higher Assembly Language (HAL) by Eggplant Farms, FastRPL by mcbeach of TI French Team, BBC Basic by Ben Ryves of Maxcoderz Software, Antidisassemblage by Dan Cook, and most recently Axe Parser by Kevin Horowitz.
There have actually been several assembly libraries created to work with TI-Basic programs. A library enhances a TI-Basic program in some way, providing support to an internal function of the calculator (such as lowercase text) or access to a peripheral of the calculator (such as the USB port on the TI-84+/SE). The most popular and useful libraries have been: Omnicalc by Michael Vincent, xLIB by Patrick Prendergast, Celtic by Rodger Weisman, and most recently Grammer by Xeda Elnara.
There is also a computer application created by Martin Warmer called BasicBuilder that allows you to package your TI-Basic program(s) into a Flash application, which appears in the APPS menu and gets executed just like a regular assembly application. Although there are some disadvantage to turning your TI-Basic programs into a Flash application, it allows your programs to be run from the archive and prevents people from editing them. The application also compresses the programs, which allows you to put more programs in an application than regular archived programs.
The TI-Basic language itself provides three commands — Asm(, AsmPrgm, and AsmComp( — for running and compiling shell-independent assembly programs, which you simply run from the home screen or inside a program. Writing these kind of assembly programs is actually more difficult, however, because the assembly language instructions are represented as hexadecimal numbers (i.e., hexcodes).
Two additional commands for running assembly programs have been added on the TI-84 Plus and TI-84 Plus SE calculators: OpenLib( and ExecLib. They can be used for running routines from Flash application libraries that have been specifically written for use with these commands. So far, however, most major libraries use other methods, for compatibility with pre-TI-84 calculators. The only existing software that uses OpenLib( and ExecLib is usb8x, a library for advanced use of the TI-84 Plus/SE USB port. Here, compatibility is obviously out of the question.