Jump to content

HP-41C

From Alfawiki
Hewlett-Packard
IndustryElectronics, Computer hardware
FoundedJanuary 1, 1939; 87 years ago (1939-01-01)
FounderBill Hewlett, Dave Packard
Headquarters
Palo Alto, California
,
United States
ProductsHP-41C series calculators

The HP-41C series represents a line of programmable, expandable handheld calculators featuring continuous memory and utilizing RPN. Manufactured by Hewlett-Packard between 1979 and 1990, the initial HP-41C model was the pioneering handheld device to incorporate an alphanumeric display. Later variants, namely the HP-41CV and HP-41CX, delivered greater memory capacity alongside advanced capabilities.

The alphanumeric "revolution"

The introduction of the HP-41C’s alphanumeric liquid crystal display marked a significant advancement in calculator usability by presenting clear prompts and error messages. Instead of vague alerts, it displayed explicit notices such as "DATA ERROR" when invalid operations were attempted. This enhancement improved user experience and broadened the spectrum of practical applications for the calculator.

Prior to the HP-41C, accessing various functions on calculators often demanded numerous keys or intricate shift-key combinations. For instance, the HP-67 required three different shift keys, while competitors like Texas Instruments offered two shift keys but nearly 50 buttons on models like the TI-59. These approaches were either unwieldy or necessitated memorizing complex codes. Hewlett-Packard’s design employed a one-byte instruction format that limited key assignments but allowed for a more efficient user interface.

The HP-41C presented a streamlined keyboard with a single shift key, granting access to hundreds of functions through the ("execute") key by typing out commands—such as FACT for factorial. Users could extensively personalize key functions, aided by blank keyboard overlays for labeling. Hewlett-Packard even released a variant with blank keys—internally dubbed "Blanknut"—targeted at specialized custom uses.

Having an alphanumeric display also made programming easier by showing fully spelled-out function names rather than numeric codes alone. This eliminated the need to memorize function identifiers or distinguish them from numeric data, lowering the learning curve and enhancing programming productivity.

The display utilized a fourteen-segment LCD capable of rendering uppercase letters, numerals, and select punctuation marks (known as the FOCAL character set), striking a balance between readability and energy efficiency compared to the LED displays prevalent at that time. Although some characters required segment manipulation for clarity—such as differentiating S from 5—lowercase letters were generally unsupported except for a few instances (a–e).

Competitors like Sharp introduced dot matrix LCDs with 5×7 pixel grids that produced more natural-looking characters in devices such as the Sharp PC-1211; Hewlett-Packard later incorporated similar technology in their HP-71B handheld computer.

The HP-41CV and CX

Many users occupied all four available ports with memory expansion modules, leaving no slots free for additional accessories. To resolve this limitation, HP developed the Quad Memory Module, which quadrupled memory capacity while freeing up three expansion slots. The HP-41CV (with "V" symbolizing five) integrated this module directly onto the main circuit board, delivering five times the memory of the original HP-41C and maintaining four free slots.

Because internal architecture imposed constraints on expanding memory further, HP introduced an extended memory module functioning as secondary storage. Although this extra memory could not be accessed directly, data transfer between it and main memory was possible, resembling file management systems found in contemporary personal computers.

The final iteration in the series, the HP-41CX, launched in 1983 and produced until 1990, featured extended memory support, an integrated timekeeping module, and additional enhanced functionalities.

Programming

The HP-41C supports keystroke programmable functionality, allowing users to record and replay sequences of keystrokes tailored to specific problems. These programs can execute any keyboard command and incorporate both conditional and unconditional branches, as well as loops, to manage repetitive operations and decision-making processes.

With indirect addressing capabilities (computed goto), the HP-41C’s programming paradigm is Turing complete, enabling sophisticated control flows, though it often leads to complex and tangled code structures commonly referred to as spaghetti code.

Program instructions are initially numbered starting at 1, but these numbers update automatically when instructions are inserted or deleted. The LBL command defines labels that can be called by the user or targeted by GTO (goto) and XEQ (execute) commands.

Programming example

The following example calculates the factorial of an integer ranging from 1 to 69 (limited by the calculator's maximum exponent). The integer input is placed in the X register and passed as a parameter. This program occupies two memory registers, approximately 14 bytes.

Step  Op-code      Description
01    LBL'Fac      Defines a global label callable via 'XEQ Fac'
02    STO 00       Saves the input parameter into register 00
03    1            Loads 1 into X to initialize the stack
04    LBL 00       Creates a local label marking loop start
05    RCL 00       Retrieves value from register 00 into X
06    *            Multiplies X and Y, updating factorial value
07    DSE 00       Decrements register 00; skips next if zero
08    GTO 00       Returns to local label to continue loop
09    END          Terminates program; final result in X

FOCAL

The programming language for the HP-41 series was based on keystroke programming but was extended with additional features such as keyboard overlays, a fully customizable keyboard layout, input/output functions for program storage and transfer, and alphanumeric display support. These enhancements led users to suggest naming it "FOCAL" (Forty One Calculator Language). However, since Digital Equipment Corporation already used this name, HP never officially adopted it.

Synthetic programming

The HP-41C cultivated an active user base that pioneered new programming techniques, developed software—including games like a codebreaking puzzle and Hunt the Wumpus—designed expansion hardware, and even explored overclocking methods. Much of this innovation was coordinated by the PPC club led by Richard J. Nelson, which released the PPC Journal and created the PPC ROM—a collection of optimized low-level routines for the HP-41C.

Enthusiasts discovered that certain FOCAL instructions occupied multiple bytes in memory. This allowed them to exploit a flaw in the program editor to assign unconventional functions to keys. This approach, termed synthetic programming, involved stepping through instructions at a sub-instruction level and editing them beyond standard limits.

Synthetic programming unlocked access to memory areas and operating system status flags, enabling features like sound production, custom character graphics, and animations not supported by official firmware. It also allowed for advanced Boolean logic shortcuts. Although Hewlett-Packard did not officially endorse synthetic programming, it did not obstruct its use and eventually supplied internal documentation to user groups.

Reception

In December 1980, BYTE lauded the HP-41C as "the most versatile machine ever," emphasizing HP's superior documentation and simpler programming experience compared to rivals such as the TI-59. The inclusion of an alphanumeric display greatly improved user interaction, positioning it nearly on par with pocket computers.

Later evaluations recognized its near-computer-grade capabilities, praised its dependable card reader, and noted compatibility with software from the HP-67 and HP-97 models. However, some critiques pointed out calculation errors caused by a limited number of guard digits, restricting precision to about seven or eight decimal places. Hewlett-Packard clarified that such precision constraints are typical for any system operating with finite numerical accuracy.

Use on the Space Shuttle

An HP-41C unit that participated in nine of the initial Space Shuttle flights is exhibited at the National Air and Space Museum in Washington, D.C. These specially modified HP-41Cs featured Velcro attachments, an early version of a timekeeping module, an amplified beeper, and removal of components prone to outgassing. They performed vital computations such as adjusting the spacecraft's center of gravity as fuel was consumed. Additionally, they served as crucial backups by determining re-entry ignition timings should the primary onboard computer fail.

Expandability

The HP-41’s capabilities could be broadened through four top-mounted slots designed for memory expansions and pre-installed solution packs tailored to fields like engineering, surveying, physics, mathematics, finance, and even gaming—enabling users to customize functionality according to their requirements. Available hardware add-ons included a thermal printer, a magnetic card reader compatible with the HP-67 via an adapter, and a barcode scanner.

Expansion modules introduced new instruction sets. While the standard HP-41 did not include functions such as integration, root-finding, matrix operations, or complex number calculations—features present in contemporaries like the HP-34C and HP-15C—these could be incorporated through optional modules.

The Interface Loop module allowed connection to a variety of peripherals including larger printers, microcassette drives, 3-inch floppy disk drives, RS-232 communication ports, and video terminals. It also supported interfacing with other Hewlett-Packard computers such as the HP-71B, HP-75, and HP-110.

HP-41 expansion modules provided users with the ability to enhance calculator functions via up to four slots located at the rear. Although other calculators—like the TI-58 and TI-59—offered pluggable ROM modules, the HP-41’s expansion options were more flexible.

Memory modules (HP-41C only)

Memory expansion modules increased available RAM to accommodate additional programming steps and data registers. The original HP-41C featured 63 registers each consisting of 7 bytes—capable of storing numerical values, 6-character alphanumeric strings, or up to seven FOCAL programming commands.

Each additional memory module contributed 64 registers; users could install up to four modules for a combined total of 319 registers (approximately 2 KB). To optimize slot usage, certain modules combined two memory chips within a single unit. Later on, HP introduced the Quad Memory Module, which consolidated four memory expansions into one slot; this innovation was integrated into the subsequent HP-41CV model.

Application pacs

ROM-based application 'pac' modules provided up to 4 kilobytes of read-only memory (with some versions reaching 8 KB by combining two separate 4 KB modules). These contained numerous programs written in the HP-41C’s native FOCAL language.

Programs stored on ROM modules could be executed from user-written programs via the XEQ command, appearing in code as "XROM" when invoking a ROM-based routine.

82104A card reader

The card reader was designed to read from and write to small plastic cards embedded with two magnetic stripes, enabling data transfer and memory backup. While the HP-41C featured non-volatile memory that made permanent storage optional, this device simplified the distribution of programs and the creation of backups.

Each card contained two magnetic strips, each capable of holding 112 bytes, which corresponded to either 16 data registers or up to 112 program steps. Most programs required at least five cards, and a complete backup of all 319 memory registers plus internal data demanded 11 cards, each needing to be inserted twice.

Additionally, the card reader was compatible with HP-67 magnetic cards, converting HP-67 programs into HP-41C instructions due to their shared programming architecture. Certain instructions unique to the HP-67 were emulated by the reader for compatibility.

Magnetic cards could be write-protected, allowing users to save programs privately—the source code remained concealed when loaded—making this ideal for secure program sharing. However, the card reader's motor consumed significant battery power, and blank cards were relatively expensive.

82182A time module

This module introduced a real-time clock with programmable alarms capable of launching user programs and powering on the calculator. Such features supported scheduled task execution and energy-efficient operation, which proved beneficial in laboratory data acquisition scenarios.

The HP-41CX model incorporated this time module as an integral component.

82143A thermal printer/plotter

Utilizing paper rolls, this thermal printer produced lines containing up to 24 characters with bluish ink that was prone to fading or discoloration when exposed to heat.

It provided limited graphic functionality, permitting custom character creation and pixel-level control. However, due to buffer constraints, it could not print graphics across an entire line or adjust line spacing dynamically, thereby limiting continuous horizontal graphics output. Despite these restrictions, tools were available for plotting vertical graphs on the narrow paper strip.

82242A infrared printer interface

This interface module allowed wireless connection to thermal printers equipped with an infrared port, specifically the HP 82240A and HP 82240B models. It enabled cable-free printing convenience; however, the printer itself required battery power.

82153A optical wand

Shaped like a pen, this optical wand functioned as a barcode scanner designed to input HP-standard barcodes directly into calculator memory. These barcodes—found in HP solution manuals—included programs, constants, or sequences of keypresses, enabling operation without using the keyboard and assisting in diagnosing keyboard malfunctions.

82180A extended functions module

This module introduced several highly sought-after capabilities such as customizable key assignments and flexible memory partitioning. Most importantly, it handled extended memory management: although the HP-41C had theoretical access to up to 1024 registers, its main memory was capped at 319. The Extended Functions module provided commands for managing extra memory banks as named files for programs or data, which could be transferred between extended and main memory for usage.

It also supported ASCII file handling and included a simple text editor. Containing 124 registers of extended memory itself, additional capacity could be added via Extended Memory modules. The HP-41CX model featured this module built-in by default.

82181A Extended Memory Module

These expansion modules increased the extended memory capacity of the HP-41C, but installation required either the Extended Functions module or the HP-41CX calculator. Each module provided an additional 238 registers, and up to two units could be installed simultaneously. Combined with the 124 registers from the Extended Functions module, this allowed a total of approximately 600 extended memory registers. When added to the 319 main registers, the system could access up to 919 registers (equivalent to 6433 bytes), nearly reaching the calculator’s maximum addressable memory limit.

HP82160A HP Interface Loop (HP-IL) Module

Refer to the primary article on HP-IL for detailed information.

DM41 Series

The continued demand for the HP-41CX inspired SwissMicros to introduce the compact DM41 model in 2015, roughly the size of a credit card (88×59×7 mm). It operates on the original HP-41CX firmware while adding expanded memory and a real-time clock, powered by an ARM Cortex-M0 NXP LPC1115 processor emulator. Unlike its predecessor, it adopts a landscape orientation similar to Hewlett-Packard's HP Voyager series, featuring a dot-matrix display, adjustable processor speeds, and a USB Mini-B serial port (using a Silicon Labs CP2102 chip). This interface supports PC connectivity for data transfer, backups, communication with applications, and firmware updates.

In December 2015, SwissMicros launched the DM41L, which is sized like Voyager series calculators but maintains USB connectivity. From September 2020 onwards, the DM41X model has been available, offering improved features and a design that closely mimics the original HP-41CX aesthetic.

HP41CL

Apart from software-based emulators of the HP-41, the HP41CL represents a genuine hardware clone of the HP-41 CPU board, engineered by Monte Dalrymple at Systemyde. This device completely redesigns the original CPU board by implementing its processor on an FPGA, programmed in Verilog at the RTL. The HP41CL functions as a direct replacement for compatible HP-41 CPU boards.

This upgrade provides more than 600 extended memory registers and supports over 320 virtual plug-in modules through more than 1024 pages of 4K-word flash memory—over 500 pages come preloaded with HP-41 software—and 128 RAM pages accessible via a custom MMU. The "NEWT" CPU design includes a "turbo" mode that boosts processing speed roughly fiftyfold. Full compatibility with the HP-41 series bus is retained, enabling most plug-in modules to operate seamlessly.

Systemyde also offers clones of an HP-41 compatible timer module and a GPS receiver interface module. Additionally, an optional RS-232 full-duplex serial port is available via a 2.5mm stereo jack connector, which occupies one module slot.

Emulators

Although production ceased in 1989, the HP-41 series continues to have a strong enthusiast community. As a result, emulator software is available across numerous platforms including Windows, Mac OS, various Unix distributions, Pocket PC, Palm OS, Apple iOS, and Android devices.

See also

Further reading

  • HP-41C Operating Manual - Expert User's Reference, Hewlett-Packard Company, June 1980
  • Ken Emery, Introduction to HP-41 MCode, Synthetix, 1985
  • Włodzimierz Mier-Jędrzejowicz, Enhance Your HP-41, Synthetix, 1986
  • Burkhard Oerttel and collaborators, Eine Programmsammlung für den HP-41 (Program Collection for the HP-41), Heldermann Verlag, Berlin, 2014 (originally published 1989), German language
  • William C. Wickes, Synthetic Programming Techniques on the HP-41C, Larken Publications, 1980

External links