TI-59 / TI-58
The TI-59 is an early programmable calculator, that was manufactured by Texas Instruments from 1977. It is the successor to the TI SR-52, quadrupling the number of "program steps" of storage, and adding "ROM Program Modules" (an insertable ROM chip, capable of holding 5000 program steps). Just like the SR-52, it has a magnetic card reader for external storage. One quarter of the memory is stored on each side of one card. The TI-58 (May 1977), and later TI-58C (1979), are cut-down versions of the TI-59, lacking the magnetic card reader and having half the memory, but  otherwise identical. Although the TI-58C uses a different chip than the TI-58, the technical data remain identical. The "C" in a TI (or Hewlett-Packard) model name indicates that the calculator has a "constant" memory (or continuous memory, respectively) allowing retention of programs and data when turned off. These calculators use a parenthesized infix calculation system called "Algebraic Operating System" (AOS), where, compared to the postfix RPN system used by other scientific calculators (such as HP), the operator enters calculations just as they are written on paper, using up to nine levels of parenthesis. The calculator can be powered from  an external adapter or from internal NiCd rechargeable battery pack (although the battery has to remain present when using the external AC adapter to avoid damage to the calculator circuitry). Display. The red LED display shows 10 decimal digits of precision. Programming. Programming simple problems with the TI-59 or TI-58 is a very straightforward process. In programming mode, the TI-59 simply records key presses. Alphabetical keys provide easy access to up to ten entry points. It is also possible to activate any of the programs in the pre-programmed memory module, and run one like any user-written program. Programs  written by the user can also use programs in the module as subroutines. The module's programs run directly from ROM, so they leave the calculator's memory free for the user. However, exploiting the computer-like capabilities of the TI-59 is a different matter. Although the TI-59 is Turing-complete, supporting straight-line programming, conditions, loops, and indirect access to memory registers, and although it supports limited alphanumeric output on the printer only, writing sophisticated routines is essentially a matter of planning machine language and using a coding pad. A large degree of sharing occurred in the TI-59 and  TI-58 community. At least one game, "Darth Vader's Force Battle", appeared as a type-in program. Programming example. Here is a sample program that computes the factorial of an integer number from 2 to 69. For 5!, if "5 A" is pressed, it gives the result, 120. Unlike the SR-52, the TI-58 and TI-59 do not have the factorial function built-in, but do support it through the software module which was delivered with the calculator. Here is the same program written for TI Compiler: Memory. In comparison to its contemporary main competitor, Hewlett-Packard HP-67, the TI-59 has  about twice the memory. The partition between program steps and memories is adjustable in increments of 80 program steps/10 memories, and as many as 960 program steps (with zero memories) or as many as 100 memories (with 160 program steps) can be configured. The TI-59 was the first programmable pocket calculator where the manufacturer provided a system for sharing memory between data registers and program storage. The memory is only about twice as large as in the SR-52, but more flexible, and thus the possible number of program steps was four times as high. Contents of this memory are lost  when the calculator is turned off. The TI-58 has half the memory of the TI-59 and supports up to 480 program steps or 60 memories. It competed with the HP-34C. The TI-58 and TI-59 calculators have variable-length instructions. Some keypresses are merged into one programming step, so that instructions from one to eleven keypresses are stored in one to six programming steps. The HP-67 always stores one instruction in one programming step, which is efficient for some frequently used instructions but also limits the number of possible instructions. Magnetic card reader. The TI-59 can store programs and data on  small magnetic cards when the calculator is turned off and quickly reloaded when needed. Click below for a video of the card reader in action. The video also shows the dual use of the magnetic card as a program documentation menu. Notes can be printed or handwritten by the programmer on the top side of the magnetic card. Once read by the cardreader, the card can then be stored, as shown, in a slot between the top of the keyboard and the display, thus providing a notation indicating both the name of the program currently loaded and the purpose of  each of the five label buttons A-E and their secondary functions A'-E' within the loaded program. The TI-58 does not have a magnetic card reader. Solid State Software Library. The TI-59 and TI-58 were the first hand-held calculators to utilize removable ROM program modules. The Master Library Module ROM was included with the TI-59 and TI-58, and contains several useful pre-programmed routines and even a game. Additional modules - for such applications as real estate, investment, statistics, surveying and aviation - were sold separately. The programs in the modules used the user-defined keys heavily. To make the programs  easier to use, plastic cards with the same size as the magnetic cards, but just printed to label the user-defined keys, can be inserted in the slot between the display and the keyboard to label the user-defined keys. Printer. Also available for the TI-59 and TI-58 was a thermal printer (the PC-100A, B, and C models); the calculator was mounted on top of the printer and locked in place with a key. The calculator can be programmed to request input from the user, and output results of calculations to the printer. Alphanumeric text (64 characters total, including space , 0-9, A-Z and 25 punctuation and mathematical symbols) can be output as well as numbers. A limited ability to plot graphs is provided. The printer is also valuable for program development because it can produce a hard copy of the calculator's program including the alphanumeric mnemonics instead of just the numeric codes normally visible on the display, as well as a dump of the data registers, a trace of the program's execution and other information about the program. In the early model PC-100A, a switch inside the battery charger compartment allows use with the earlier SR-52  and SR-56 calculators as well as the TI-58/59 series. In addition, it also works with non-programmable TI machines of the era such as the SR-50A. (Remove the battery pack of a TI calculator and look for the row of printer interface pads on the circuit board below the battery terminals.)