|
Basic Calculators
TI-BASIC is the unofficial name of a BASIC-like language built into Texas Instruments (TI)'s graphing calculators. (TI only refers to it as the calculators' "extensive programming capability". more...
Home
A/V Accessories & Cables
DVD & Home Theater
Gadgets & Other Electronics
Air Purifiers
Breathalyzers
Calculators
Basic Calculators
Books, Manuals
Financial Calculators
Hewlett-Packard
Other Brands
Sharp
Texas Instruments
Graphing Calculators
Cables, Links
Hewlett-Packard
Other Brands
Texas Instruments
Other Calculators
Printing Calculators
Scientific Calculators
Hewlett-Packard
Other
Texas Instruments
Vintage Calculators
Dictionaries & Translators
Digital Clocks & Clock...
eBooks
Flashlight Key Chains
Fresnel Lenses
Home Automation
Language Filters
Laser Pointers
Metal Detectors
Other Gadgets
Polygraphs
Radiation Detectors
RF Locators
Surveillance
Therapeutic Devices
Timers
Voltage Converters
Weather Devices
Heating, Cooling & Air
Home Audio
Lamps, Lighting, Ceiling...
Major Appliances
Outdoor Power Equipment
Satellite, Cable TV
Televisions
Vacuum Cleaners &...
) It is the simplest way to program any TI calculator; assembly language (often referred to as "asm") can also be used, and C compilers exist for translation into assembly: TIGCC for Motorola 68000 based calculators, and Z88DK for Zilog Z80 based calculators. However, both of them are in fact cross-compilers, not allowing on-calculator programming. Although TI-BASIC is considerably slower than assembler and consequently is not very good for programming fast applications and games, it is very useful for quickly writing programs to solve math problems (formulae, etc) and for performing repetitive tasks.
Although it is lacking in features and usability, TI-BASIC is nonetheless an important factor in the programming community. Because TI graphing calculators are required at nearly all American high schools, TI-BASIC is often the first glimpse many students have into the world of programming. Learning to program in TI-BASIC is a relatively easy task, encouraging potential programmers to explore the field of computer science.
Examples
These examples are slightly TI-83-series biased. For example, "ClrHome" would be "ClLCD" on the TI-85 and TI-86.
An entirely different command is required to clear the screen in the TI-89. Since output is generally displayed on the ProgramIO screen, the "ClrIO" command is required to clear the output screen. There exists a "ClrHome" command on the TI-89, and it performs its function - namely, clearing the Home screen. For the purpose of programs, however, this command is essentially useless (yet it is invaluable in the programming of functions).
Hello world
The following program, when run, will print the phrase "HELLO WORLD!":
Z80 Series
68000 Series
Bounce
The following program, when run, will print out the phrase "Bounce" which bounces around the screen.
Z80 Series
Explanation
The ClrHome command clears the "home screen" of the calculator, then the variables we'll use: X, Y, S, and T are initialised to 1.;
The While 1 statement begins an infinite loop.;
The string "BOUNCE" is displayed on the calculator at the co-ordinates given by X and Y.;
X and Y are both incremented by one (because S and T both equal 1). If the string were output at this point it would be (1,1) offset the last location. If X and Y are beyond the size of the screen (16,8) then the value to increment is negative, so the string will now be output (-1,-1) of the last location.;
The home screen is cleared again. Omitting this statement means "BOUNCE" fills the screen.;
Finally, the End statement delimits the While block above, it doesn't actually end the program.;
The program, like all programs written in TI-BASIC,can be halted by pressing the On button of the calculator once.
Read more at Wikipedia.org
|
|