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 and
HP-12C.
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 (
Casio BASIC or BasicLike) 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. The version for the Ti-89 and subsequent is more fully featured, including the full set of string and character manipulation functions and statements in standard Basic. 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. The language
PPL was introduced with the
HP Prime calculator and is much like
Pascal.
Assembly An assembler integrated into the TI 89 and related calculators was announced and released in 2014. 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 included some onboard support for assembler programming on the
HP-50g, its then top-of-the-line calculator model. Programs and toolkits to allow on-board assembly-like programming (often
Intel 80x86 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" programs just as one would the Basic type ones. Other languages like Rexx, awk, Perl, 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 Casio, HP, and TI calculators, meaning that
C,
C++,
Fortran 77, and
inline assembly language can be used to develop a program 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. Many TI, Casio, Sharp, and HP models have Lua interpreters which are part of the default configuration or can be optionally added. Some calculators run a subset of Fortran 77 called Mini-Fortran; the compiler is on the calculator so connecting to a PC to put programs onto the machine is not needed. The OnCalc C Compiler for the Casio fx-9860 series is now available. The Sharp PC G850V pocket computer has an onboard C compiler in addition to an assembler and a Basic interpreter. == Persistent memory ==