Programmable calculator

From Wikipedia, the free encyclopedia

Programmable calculators are calculators that can automatically carry out a sequence of operations under control of a stored program, much like a computer. The first programmable calculators such as the IBM CPC used punched cards or other media for program storage. Hand-held electronic calculators store programs on magnetic strips, removable read-only memory cartridges, or in battery-backed read/write memory.

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

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.

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, infrared wireless link or through a memory card. Sometimes these programs can also be run through emulators on the PC.

One possibility arising from the above is writing interpreters, compilers, and translator programmes for additional languages for programming the machines; BBC Basic has already been ported to the TI-83 and -84 series and other on-board languages and programming tools discussed by many include Fortran, awk, Pascal, Rexx, perl, Common Lisp, Python, tcl, and various Unix shells.

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.

Programming languages

Keystroke programming

In the early days most programmable calculators used a very simplified programming language, often based either on recording actual keystrokes or bytecode if the keystrokes were merged. Calculators supporting such programming were Turing-complete if they supported both conditional statements and indirect addressing of memory. Notable examples of Turing complete calculators were Casio FX-602P series, the HP-41 and the TI-59. Keystroke programming is still used in mid-range calculators like the HP 35s.

BASIC

BASIC is a widespread programming language commonly adapted to desktop computers and pocket computers. The most common languages now used in high range calculators are proprietary BASIC-style dialects as used by CASIO and TI (TI-BASIC). These BASIC dialects are optimised for calculator use, combining the advantages of BASIC and keystroke programming. They have little in common with mainstream BASIC.[1][2][3]

A complete port of BBC Basic to the TI-83 subfamily of calculators is now available. It is installed via a cable or IrDA connection with a computer.

RPL

RPL is a special Forth-like programming language used by Hewlett Packard in its high range devices. The first device with RPL calculator was the HP-28C released in 1987.[4]

Assembler

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.

Programmes and toolkits to allow on-board assembly-like programming (often Intel 80*86 even if the actual processor in the calculator is something completely different like a Zilog or Motorola chip) are in the beta stage in at least two implementations—the native Basic variant can be enhanced by user-defined functions and procedures as well as assembly and C modules developed on a computer and uploaded to the calculator which allow for writing and running "pseudo assembly" programmes just as one would the Basic type ones. Other languages like Rexx, awk, Perl, and Windows NT and some Unix shells can also be implemented in this fashion on many calculators of this type.

Other Languages

The GCC development suite is available for several models of HP and TI calculators, meaning that C, C++, Fortran 77, and inline assembly language can be used to develop a programme on the computer side and then upload it to the calculator.

Projects in development by third parties include on-board and/or computer-side converters, interpreters, code generators, macro assemblers, or compilers for Fortran, other Basic variants, awk, C, Cobol, Rexx, Perl, Python, Tcl, Pascal Delphi, and operating system shells like DOS/Win95 batch, OS/2 batch, WinNT/2000 shell, Unix shells, and DCL.

Persistent memory

One important feature of programmable calculators is the availability of some form of persistent memory. Without persistent memory, programs have to be re-entered whenever power is lost, making the device cumbersome. Persistent memory can be internal or on a separate device. Some programmable calculators employ both schemes.

Magnetic card reader / writer

Magnetic card readers were among the first persistent memory options available.[5] The entered programs are stored on magnetic strips. Those were easy to transport, and the reader/writer was compact in size. However, the reader/writer as well as the magnetic strips were quite expensive. The last and most notable devices to use magnetic strips were the HP-41C and TI-59.

Continuous memory

Continuous memory does not lose its content when the calculator is switched off. With continuous memory the user can, for example, change batteries without losing the entered programs.[6]

Cassette tape

Compact Cassettes offered a simple, inexpensive alternative to magnetic cards. Usually, an interface module, such as the Casio FA-1, was used to connect the calculator to an ordinary cassette recorder and digital data were encoded as frequency-shift keyed audio signals.[7]

Sharp and Hewlett-Packard also sold dedicated micro- or mini-cassette recorders that connected directly to the calculator. These set-ups, while being more practical and reliable, were also more expensive.

Semi-continuous memory

As memory demands rose, it became more difficult to create true continuous memory and developers sought alternatives. With semi-continuous memory memory content was only preserved if specific battery changing rules were observed. The most common rules were:

  1. A special backup battery would ensure that the memory was not lost while the main batteries were changed.
  2. Batteries had to be changed in a relatively short time. For example with the HP 35s batteries have to be changed in less than 2 minutes.[8]
  3. At least two main batteries were used and could only be changed one at a time.

PC-connection

Programs and data are transferred to a Personal computer for storage. The transfer is done by the following connection methods (chronological order of appearance) RS-232, IrDA and USB. This method has the advantage of being very cost efficient and is usually faster than cassette interface. These advantages are offset by the need of a Personal computer. An early example of PC connection is the Casio FX-603P in conjunction with the Casio FA-6 interface. In this set-up transfer was done in Plain text so the program and data could not only be stored but also edited with a standard Text editor.

Flash memory

Programmable calculators and pocket computers

Throughout the 80's and the beginning of the 90's programmable calculators stood in competition with pocket computers, with high end calculators sharing many similarities. For example both device types were programmable in unstructured BASIC and with few exceptions featured QWERTY keyboards. However there were also some differences:

  • BASIC programmable calculators often featured an additional "calculator like" keyboard and a special calculator mode in which the system behaved like a Scientific calculator.
  • Pocket computers often offered additional programming languages as option. The Casio PB-2000 for example offered ANSI-C, BASIC, Assembler and Lisp.[9]

Companies often had both device types in their product portfolio. Casio for example sold some BASIC programmable calculators as part of their "fx-" calculator series [10] and pocket computer the dedicated "pb-" series while Sharp on marketed all BASIC programmable devices as pocket computer.

See also

References

  1. Programming Casio FX-7400G+
  2. Programming Casio BASIC on the CFX-9850 Series
  3. TI-Basic Developer
  4. Description of the HP-28C in The Museum of HP Calculators
  5. i.E. HP 9810A introduced 1971
  6. Description of the HP-15C in the The Museum of HP Calculators
  7. Description of the FX-502P and FA-1 on Voidware
  8. HP-32s Users Manual Page 289ff
  9. Description of the PB-2000 in Caz Pocket Computers
  10. The picture of the FX-700P and FX-702P show the text "programmable calculator"

List of programmable calculators

Casio 
Casio FX-502P series · Casio FX-602P series · Casio FX-603P · FX-702P · FX-850P · Casio 9850 series · Casio 9860 series · Casio ClassPad 300
Hewlett-Packard 
HP-25 · HP 35s · HP-41C · HP-48 · HP-49 · HP-50 · HP-65
Sharp 
PC-1401 · PC-1403
Texas Instruments 
TI-58 C · TI-59 · TI-83 Plus · TI-84 Plus · TI-89
Elektronika 
B3-21 · B3-34 · MK-61 · MK-52 · MK-85 · MK-90 · MK-92 · MK-98
MK-152 · MK-161
This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.