HP-41
Encyclopedia
The HP-41C series are programmable, expandable, continuous memory handheld RPN
calculator
s made by Hewlett-Packard
from 1979 to 1990. The original model, HP-41C, was the first of its kind to offer alphanumeric
display capabilities. Later came the HP-41CV and HP-41CX, offering more memory and functionality.
LCD
screen of the HP-41C revolutionized the way a calculator could be used, providing user friendliness (for its time) and expandability (keyboard-unassigned functions could be spelled out alphabetically). By using an alphanumeric display, the calculator could tell the user what was going on: it could display meaningful error messages ("ZERO DIVIDE") instead of simply a blinking zero; it could also specifically prompt the user for arguments ("ENTER RADIUS") instead of just displaying a question mark.
Earlier calculators needed a key, or key combination, for every available function. The HP-67 had three shift keys; the competing Texas Instruments
calculators had two (2nd and INV) and close to 50 keys (the TI-59
had 45). Hewlett-Packard were constrained by their one byte only instruction format. The more flexible storage format for programs in the TI-59
allowed combining more keys into one instruction. The longest instruction required eleven keypresses, re-using the shift keys four times. The TI-59
also made use of the Op key, followed by two digits, to access another 40 different functions. But the user had to remember the codes for them. Clearly, a more convenient and flexible method of executing the calculator's instructions was in urgent need. The HP-41C had a relatively small keyboard, and only one shift key, but provided hundreds of functions. Every function that was not assigned to a key could be invoked through the XEQ key and spelled out in full, e.g. XEQ FACT for the factorial
function.
The calculator had a special user mode where the user could assign any function to any key if the default assignments provided by HP were not suited to a specific application. For this mode, the HP-41C came with blank keyboard templates; i.e. plastic covers with holes for the keys, so the user could annotate customized keys. Hewlett-Packard even sold a version of the calculator where hardly any keys had function names printed on them, meant for users who would be using the HP-41C for custom calculations only (thus not needing the standard key layout at all); this version of the calculator was colloquially known, within HP's Corvallis calculator team, as a "Blanknut" (because the development code name for the HP-41c's processor was known as the "coconut").
Alphanumeric display also greatly eased editing programs, as functions were spelled out in full. Numeric-only calculators displayed programming steps as a list of numbers, each number generally mapped to a key on the keyboard, often via row and column coordinates. Encoding functions to the corresponding numeric codes, and vice versa, was left to the user, having to look up the function–code combinations in a reference guide. The busy programmer quickly learned most of the codes, but having to learn the codes intimidated the beginners. In addition to this, the user had to mentally keep function codes separate from numeric constants in the program listing.
The HP-41C displayed each character in a block consisting of 14 segments that could be turned on or off; a so-called fourteen segment display (similar to the much more common seven segment displays, which can be used to display digits only). The HP-41C used a liquid-crystal display instead of the ubiquitous LED
displays of the era, to reduce power consumption.
While this allowed the display of uppercase letters, digits, and a few punctuation characters, some designs needed to be twisted arbitrarily (e.g. to distinguish S from 5) and lowercase letters were unreadable (HP only provided display of lowercase letters a through e). HP's competitor Sharp, when introducing the PC-1211, used a dot matrix
of 5×7 dots and displayed the characters in principle as we see them today on computer screens (and, in fact, many LCD screens on various embedded system
s); this was later used by HP with the HP-71B
handheld computer.
, a magnetic card reader (HP-67 compatible via converter software), and a barcode "wand" (reader).
Extension modules could also add new instructions to the machine. The standard set of mathematical functions of the 41-series was somewhat limited when compared to the functionality of some of contemporary models among the HP-line of calculators (notably the HP-34C
and the HP-15C). Among others, the standard function set offered no integration or root-finding capabilities and lacked support of matrices and complex numbers, which could be added by an extension module.
Another module, known as the Interface Loop
allowed for connection of more peripherals: larger printers, microcassette
tape recorders, 3½" floppy disk
drives, RS-232
communication interfaces, video display interfaces, etc. The Interface Loop could also be used with the HP-71B
, HP-75
and HP-110 computers.
The internal architecture prohibited the addition of more memory, so HP designed an extended memory module that could be seen as secondary storage. You could not access the data directly, but you could transfer it to and from main memory. To the calculator (and the user), data located in the extended memory looked like files on a modern hard disk do for a PC (user).
The final HP-41 model, the HP-41CX, included extended memory, a built-in time module, and extended functions. It was introduced in 1983 and discontinued in 1990.
, meaning that it can remember and later execute sequences of keystrokes to solve particular problems of interest to the user. These keystroke programs, in addition to performing any operation normally available on the keyboard, can also make use of conditional and unconditional branching and looping instructions, allowing programs to perform repetitive operations and make decisions.
The HP-41C still supports indirect addressing with which it is possible to implement a Universal Turing machine
and therefore the programming model of the HP-41C can be considered Turing complete.
Step Op-code Comment
01 LBL'Fac The program starts with XEQ Fac
02 STO 00 Store X in register 0
03 1 Store 1 in X
04 LBL 00 Label for goto
05 RCL 00 Recall register 0 into X
06 * Multiply x and y
07 DSE 00 Decrement register 0 and skip next command when 0
08 GTO 00 Go to label 0
09 END End program - result displayed in x
). Most of these activities were coordinated by the PPC club and its president, Richard J. Nelson. The PPC club produced the PPC ROM, a collection of highly optimized low-level programs.
One of the discoveries of the community was that it was possible to exploit a bug in the program editor to assign strange functions to keys. The most important function was known as the byte jumper, a way to step partially through programming instructions and edit them in ways that were not otherwise allowed. The use of the resulting instructions was called synthetic programming
.
Through synthetic instructions, a user could access memory and special status flags reserved for the operating system, and do very strange things, including completely locking the machine. It was possible to create sounds or display characters, and create animations not officially supported by the operating system. The system flags were also accessed as low-level shortcuts to boolean programming techniques. Hewlett-Packard did not officially support synthetic programming, but neither did it do anything to prevent it, and eventually even provided internal documentation to the user groups.
It could have been used in an emergency to calculate orbit and re-entry information if there were failure of the shuttle main computer systems.
Reverse Polish notation
Reverse Polish notation is a mathematical notation wherein every operator follows all of its operands, in contrast to Polish notation, which puts the operator in the prefix position. It is also known as Postfix notation and is parenthesis-free as long as operator arities are fixed...
calculator
Calculator
An electronic calculator is a small, portable, usually inexpensive electronic device used to perform the basic operations of arithmetic. Modern calculators are more portable than most computers, though most PDAs are comparable in size to handheld calculators.The first solid-state electronic...
s made by Hewlett-Packard
Hewlett-Packard
Hewlett-Packard Company or HP is an American multinational information technology corporation headquartered in Palo Alto, California, USA that provides products, technologies, softwares, solutions and services to consumers, small- and medium-sized businesses and large enterprises, including...
from 1979 to 1990. The original model, HP-41C, was the first of its kind to offer alphanumeric
Alphanumeric
Alphanumeric is a combination of alphabetic and numeric characters, and is used to describe the collection of Latin letters and Arabic digits or a text constructed from this collection. There are either 36 or 62 alphanumeric characters. The alphanumeric character set consists of the numbers 0 to...
display capabilities. Later came the HP-41CV and HP-41CX, offering more memory and functionality.
The alphanumeric "revolution"
The alphanumericAlphanumeric
Alphanumeric is a combination of alphabetic and numeric characters, and is used to describe the collection of Latin letters and Arabic digits or a text constructed from this collection. There are either 36 or 62 alphanumeric characters. The alphanumeric character set consists of the numbers 0 to...
LCD
Liquid crystal display
A liquid crystal display is a flat panel display, electronic visual display, or video display that uses the light modulating properties of liquid crystals . LCs do not emit light directly....
screen of the HP-41C revolutionized the way a calculator could be used, providing user friendliness (for its time) and expandability (keyboard-unassigned functions could be spelled out alphabetically). By using an alphanumeric display, the calculator could tell the user what was going on: it could display meaningful error messages ("ZERO DIVIDE") instead of simply a blinking zero; it could also specifically prompt the user for arguments ("ENTER RADIUS") instead of just displaying a question mark.
Earlier calculators needed a key, or key combination, for every available function. The HP-67 had three shift keys; the competing Texas Instruments
Texas Instruments
Texas Instruments Inc. , widely known as TI, is an American company based in Dallas, Texas, United States, which develops and commercializes semiconductor and computer technology...
calculators had two (2nd and INV) and close to 50 keys (the TI-59
TI-59
The TI-59 was an early programmable calculator, manufactured by Texas Instruments from 1977. It was the successor to the TI SR-52, quadrupling the number of "program steps" of storage, and adding "ROM Program Modules" and a magnetic card reader for external storage...
had 45). Hewlett-Packard were constrained by their one byte only instruction format. The more flexible storage format for programs in the TI-59
TI-59
The TI-59 was an early programmable calculator, manufactured by Texas Instruments from 1977. It was the successor to the TI SR-52, quadrupling the number of "program steps" of storage, and adding "ROM Program Modules" and a magnetic card reader for external storage...
allowed combining more keys into one instruction. The longest instruction required eleven keypresses, re-using the shift keys four times. The TI-59
TI-59
The TI-59 was an early programmable calculator, manufactured by Texas Instruments from 1977. It was the successor to the TI SR-52, quadrupling the number of "program steps" of storage, and adding "ROM Program Modules" and a magnetic card reader for external storage...
also made use of the Op key, followed by two digits, to access another 40 different functions. But the user had to remember the codes for them. Clearly, a more convenient and flexible method of executing the calculator's instructions was in urgent need. The HP-41C had a relatively small keyboard, and only one shift key, but provided hundreds of functions. Every function that was not assigned to a key could be invoked through the XEQ key and spelled out in full, e.g. XEQ FACT for the factorial
Factorial
In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n...
function.
The calculator had a special user mode where the user could assign any function to any key if the default assignments provided by HP were not suited to a specific application. For this mode, the HP-41C came with blank keyboard templates; i.e. plastic covers with holes for the keys, so the user could annotate customized keys. Hewlett-Packard even sold a version of the calculator where hardly any keys had function names printed on them, meant for users who would be using the HP-41C for custom calculations only (thus not needing the standard key layout at all); this version of the calculator was colloquially known, within HP's Corvallis calculator team, as a "Blanknut" (because the development code name for the HP-41c's processor was known as the "coconut").
Alphanumeric display also greatly eased editing programs, as functions were spelled out in full. Numeric-only calculators displayed programming steps as a list of numbers, each number generally mapped to a key on the keyboard, often via row and column coordinates. Encoding functions to the corresponding numeric codes, and vice versa, was left to the user, having to look up the function–code combinations in a reference guide. The busy programmer quickly learned most of the codes, but having to learn the codes intimidated the beginners. In addition to this, the user had to mentally keep function codes separate from numeric constants in the program listing.
The HP-41C displayed each character in a block consisting of 14 segments that could be turned on or off; a so-called fourteen segment display (similar to the much more common seven segment displays, which can be used to display digits only). The HP-41C used a liquid-crystal display instead of the ubiquitous LED
Light-emitting diode
A light-emitting diode is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting...
displays of the era, to reduce power consumption.
While this allowed the display of uppercase letters, digits, and a few punctuation characters, some designs needed to be twisted arbitrarily (e.g. to distinguish S from 5) and lowercase letters were unreadable (HP only provided display of lowercase letters a through e). HP's competitor Sharp, when introducing the PC-1211, used a dot matrix
Dot matrix
A dot matrix is a 2-dimensional array of LED used to represent characters, symbols and images.Typically the dot matrix is used in older computer printers and many digital display devices. In printers, the dots are usually the darkened areas of the paper...
of 5×7 dots and displayed the characters in principle as we see them today on computer screens (and, in fact, many LCD screens on various embedded system
Embedded system
An embedded system is a computer system designed for specific control functions within a larger system. often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal...
s); this was later used by HP with the HP-71B
HP-71B
The HP-71B was a hand-held computer or calculator programmable in BASIC, made by Hewlett-Packard from 1984 to 1989.The HP-71B was known as the "supreme" hand-held calculator/computer of choice at the time for those seeking the ultimate in hand-held devices. It was particularly popular at The...
handheld computer.
Expandability
The functions of the calculator could be expanded by adding modules at the back of the machine. Four slots were available to add more memory, pre-programmed solution packs containing programs covering engineering, surveying, physics, math, finance, games, etc. As such, an HP-41 could in fact be tailored to the personal needs of the user. Hardware extensions included a thermal printerThermal printer
A thermal printer produces a printed image by selectively heating coated thermochromic paper, or thermal paper as it is commonly known, when the paper passes over the thermal print head. The coating turns black in the areas where it is heated, producing an image...
, a magnetic card reader (HP-67 compatible via converter software), and a barcode "wand" (reader).
Extension modules could also add new instructions to the machine. The standard set of mathematical functions of the 41-series was somewhat limited when compared to the functionality of some of contemporary models among the HP-line of calculators (notably the HP-34C
HP-34C
Part of the series of HP calculators. HP-34C Continuous Memory Calculator was an Advanced Scientific Programmable calculator that was differentiated by the fact that programs and storage were maintained in memory when the calculator was turned off , unlike most calculators of that time...
and the HP-15C). Among others, the standard function set offered no integration or root-finding capabilities and lacked support of matrices and complex numbers, which could be added by an extension module.
Another module, known as the Interface Loop
HP-IL
The HP-IL , was a short-range interconnection bus or network introduced by Hewlett-Packard in the early 1980s. It enabled several devices such as printers, floppy disk drives, tape readers, etc...
allowed for connection of more peripherals: larger printers, microcassette
Microcassette
A Microcassette is an audio storage medium introduced by Olympus in 1969. It uses the same width of magnetic tape as the Compact Cassette but in a much smaller container. By using thinner tape and half or a quarter the tape speed, microcassettes can offer comparable recording time to the compact...
tape recorders, 3½" floppy disk
Floppy disk
A floppy disk is a disk storage medium composed of a disk of thin and flexible magnetic storage medium, sealed in a rectangular plastic carrier lined with fabric that removes dust particles...
drives, RS-232
RS-232
In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE and a DCE . It is commonly used in computer serial ports...
communication interfaces, video display interfaces, etc. The Interface Loop could also be used with the HP-71B
HP-71B
The HP-71B was a hand-held computer or calculator programmable in BASIC, made by Hewlett-Packard from 1984 to 1989.The HP-71B was known as the "supreme" hand-held calculator/computer of choice at the time for those seeking the ultimate in hand-held devices. It was particularly popular at The...
, HP-75
HP-75
The HP-75C and HP-75D were hand-held computers programmable in BASIC, made by Hewlett-Packard from 1982 to 1986.The HP-75 had a single-line liquid crystal display, 48 KiB system ROM and 16 KiB RAM, a comparatively large keyboard , a manually operated magnetic card reader , 4 ports for memory...
and HP-110 computers.
The HP-41CV and CX
Many users had used all four ports for memory expansion, leaving no room for other modules. HP designed the Quad Memory Module with four times the amount of memory, providing the maximum available memory and leaving three empty ports available. The HP-41CV (V being the roman numeral for 5) included this memory module on the main board, thus providing five times the memory of the HP-41C, and four available slots.The internal architecture prohibited the addition of more memory, so HP designed an extended memory module that could be seen as secondary storage. You could not access the data directly, but you could transfer it to and from main memory. To the calculator (and the user), data located in the extended memory looked like files on a modern hard disk do for a PC (user).
The final HP-41 model, the HP-41CX, included extended memory, a built-in time module, and extended functions. It was introduced in 1983 and discontinued in 1990.
Programming
The HP-41C is keystroke programmableKeystroke programmable
Keystroke programming describes a specific way of programming by which each keystrokes on a device or application is recorded in some way and then played back so that the recorded key-presses can be repeated multiple times...
, meaning that it can remember and later execute sequences of keystrokes to solve particular problems of interest to the user. These keystroke programs, in addition to performing any operation normally available on the keyboard, can also make use of conditional and unconditional branching and looping instructions, allowing programs to perform repetitive operations and make decisions.
The HP-41C still supports indirect addressing with which it is possible to implement a Universal Turing machine
Universal Turing machine
In computer science, a universal Turing machine is a Turing machine that can simulate an arbitrary Turing machine on arbitrary input. The universal machine essentially achieves this by reading both the description of the machine to be simulated as well as the input thereof from its own tape. Alan...
and therefore the programming model of the HP-41C can be considered Turing complete.
Programming example
Here is a sample program that computes the factorial of an integer number between 2 and 69. The program takes up 2 registers which is ≈14 bytes.Step Op-code Comment
01 LBL'Fac The program starts with XEQ Fac
02 STO 00 Store X in register 0
03 1 Store 1 in X
04 LBL 00 Label for goto
05 RCL 00 Recall register 0 into X
06 * Multiply x and y
07 DSE 00 Decrement register 0 and skip next command when 0
08 GTO 00 Go to label 0
09 END End program - result displayed in x
The HP-41C community and Synthetic programming
A large users' community was built around the HP-41C. Enthusiasts around the world found new ways of programming, created their own expansion modules, and sped up the clock (see overclockingOverclocking
Overclocking is the process of operating a computer component at a higher clock rate than it was designed for or was specified by the manufacturer, but some manufacturers purposely underclock their components to improve battery life. Many people just overclock or 'rightclock' their hardware to...
). Most of these activities were coordinated by the PPC club and its president, Richard J. Nelson. The PPC club produced the PPC ROM, a collection of highly optimized low-level programs.
One of the discoveries of the community was that it was possible to exploit a bug in the program editor to assign strange functions to keys. The most important function was known as the byte jumper, a way to step partially through programming instructions and edit them in ways that were not otherwise allowed. The use of the resulting instructions was called synthetic programming
Synthetic Programming (HP-41)
Synthetic programming is an advanced technique of programming the HP-41C range of calculators, involving creating instructions that cannot be obtained using the standard capabilities of the calculator....
.
Through synthetic instructions, a user could access memory and special status flags reserved for the operating system, and do very strange things, including completely locking the machine. It was possible to create sounds or display characters, and create animations not officially supported by the operating system. The system flags were also accessed as low-level shortcuts to boolean programming techniques. Hewlett-Packard did not officially support synthetic programming, but neither did it do anything to prevent it, and eventually even provided internal documentation to the user groups.
Smithsonian Museum
There is a HP-41C on display in the Smithsonian Air & Space Museum in Washington, D.C. It flew on seven Space Shuttle missions.It could have been used in an emergency to calculate orbit and re-entry information if there were failure of the shuttle main computer systems.
See also
- Extension modulesHP-41 extension moduleHP-41 extension modules allowed the user of a HP-41 programmable calculator to extend the functionality of the machine. The HP-41 had room for up to four expansion modules at the back of calculator....
- Focal.Focal (HP-41)The Forty-one calculator language is the language used to program the HP-41 range of expandable science/engineering calculators from Hewlett-Packard....
The programming language used on the HP-41
External links
- The Museum of HP Calculators' article on the HP-41 series
- hp41.org – A website (and domain) dedicated to the HP-41
- i41CX+ HP-41CX Emulator for the iPhone and iPod touch
- a41CV A HP41CV simulator for the Android platform
- HP-41C, HP-41CV and HP-41CX on MyCalcDB (bilingual) (database about 70's and 80's pocket calculators)
- Use of HP41 on space shuttle
- Page of a HP-41CX user with photos, documents for download, printer, card reader...