The TI-57 was a programmable calculator made by Texas Instruments between 1977 and 1982. There were three machines by this name made by TI, the first was the TI-57 with LED display released in September 1977 along the more powerful TI-58 and TI-59. It had 50 program steps and eight memory registers. Two later versions named TI-57 LCD and TI-57 LCD-II have a LCD display, but were less powerful (ran much slower) and had much less memory: 48 bytes to be allocated between program 'steps' and storage registers.
The TI-57 lacked non-volatile memory, so any programs entered were lost when the calculator was switched off or the battery ran out.
The LED display version of the TI-57 had a rechargeable Nickel-Cadmium battery pack BP7 which contains two AA size batteries and electronics to raise the voltage to the 9V required by the calculator. A popular modification is to power it from a 9V battery and use the battery cover of a LED TI-30 or a part of the dismantled battery pack. This modification provides a better battery life than the original battery pack.
Included, with at least the original version was a book entitled "Making Tracks Into Programming". It was self described as "A step-by-step learning guide to the power, ease and fun of using your TI Programmable 57".
Radio Shack also marketed this calculator, rebranded as the EC-4000.
The programming capabilities of the TI-57 were similar to a primitive macro assembler. Any keystroke could be stored, along with some simple program flow control commands and conditional tests. These included:
GTO (GoTO): Causes program pointer to jump immediately to a Label (0-9) or to a specific program step (00 to 49).
SBR (SuBRoutine): Causes a program to jump to a Label, and on encountering an Inv SBR command, continue executing at the instruction immediately following the original SBR.
DSZ (Decrement and Skip on Zero): Decrements storage register zero, and skips the next instruction if the result is zero. There was also an inverse form, Decrement and Skip if Not Zero.
Tests for equality/inequality could be performed against a value on the display (the x register) and a dedicated test register, t. The result of the test would cause the next instruction to be conditionally skipped.
Programs could be edited by inserting, deleting, or overwriting a program step. A NOP (No OPeration) function was provided to allow a program step to be ignored. Due to the hard limit of 50 program steps, use of NOP was infrequent. The TI-57 used the "one step, one instruction" principle, regardless of whether one instruction required one or up to four keypresses.
The following program generates pseudo-random numbers within the range of 1 to 6.
|02||33 0||RCL 0||RCL 0||Recall register 0|
|07||49||2nd )||Int||Integer function|
|09||32 0||STO 0||STO 0||Store result in register 0|
|11||06||6||6||Upper bound of the random number|
|15||49||2nd )||Int||Integer function|
|17||71||RST||RST||Reset (back to step 00)|