Programmable calculator

From Wikipedia, the free encyclopedia

Programmable calculators are calculators capable of being programmed much like a computer.

Since the early 1990s, most of these flexible handheld units belong to the class of graphing calculators. Before the mass-manufacture of inexpensive dot-matrix LCD displays, however, programmable calculators usually featured a one-line numeric or alphanumeric display.

For earlier devices, see: History of computing hardware

[edit] Calculator programming

Programmable calculators allow the user to write and store programs in the calculator in order to solve difficult problems or automate an elaborate procedure.

Programming capability appears most commonly (although not exclusively) in graphing calculators, as the larger screen allows multiple lines of source code to be viewed simultaneously (i.e., without having to scroll to the next/previous display line). Originally, calculator programming had to be done in the calculator's own command language, but as calculator hackers discovered ways to bypass the main interface of the calculators and write assembly language programs, calculator companies (particularly Texas Instruments) began to support native-mode programming on their calculator hardware, first revealing the hooks used to enable such code to operate, and later explicitly building in facilities to handle such programs directly from the user interface.

Before the appearance of graphing calculators with comparatively substantial processing power, most programmable calculators used a very simplified programming language, often based either on bytecode or recording actual keystrokes. Calculators supporting such programming often did not have Turing-complete languages, often sufficient to program in a formula or two with input/output but without any conditional statements, and strictly segregated program memory (measured in "steps", i.e. discrete instructions rather than contiguous memory) that did not directly impact the calculator's working memory. While not completely unknown even now, most such calculators are vintage gear no longer in wide use. (Most did not have any kind of program storage or transfer capability, though a few old desktop models such as the Hewlett-Packard HP-9100A/B could store a program on a magnetic memory card.) The concept of program "steps" is no longer common, with programmable calculators now often using a flat memory space and Turing-complete programming languages.

The most common languages now used in calculator programming are BASIC-style, mostly used in CASIO and TI calculators (TI-BASIC), Hewlett-Packard RPL, C, C++, and assembly. As these languages are commonly known, many programs written for calculators can be found on the internet. Users can download the programs to a personal computer, and then upload them to the calculator using a specialized link cable or through a memory card, or (on some high-end calculators) using an infrared wireless link. Often these programs can also be run through emulators on the PC.

Machine language programming was often discouraged on early calculator models; however, dedicated platform hackers discovered ways to bypass the built-in interpreters on some models and program the calculator directly in assembly language, a technique that was first discovered and utilized on the TI-85 due to a programming flaw in a mode-switching key. By the time the TI-83 came out, TI and HP had realized the need to address the support needs of homebrew programmers, and started to make assembly language libraries and documentation available for prospective developers. Software, particularly games, could now be nearly as fast and as graphical as their Game Boy counterparts, and TI in particular would later formalize assembly programming into support for packaged applications for future calculators such as the TI-83 Plus and TI-89; HP includes some onboard support for assembler programming on the HP-50g, its current top-of-the-line calculator model.

Commonly available programs for calculators include everything from math/science related problem solvers to video games, as well as so-called demos. Much of this code is user-created freeware or even open source, though commercial software, particularly for educational and science/engineering markets, is also available.

[edit] See also

[edit] External links

Languages