---
title: HP 42S
description: HP's RPN scientific of 1988 that runs HP-41 programs, its history, what makes it special and how saturnus runs it.
section: models
model: 42s
---

The HP 42S is a programmable RPN scientific calculator that Hewlett-Packard sold from 1988 to the mid-1990s. It runs the programs of HP's earlier HP-41C and 41CV, and adds a two-line display with menus, complex numbers, matrices, a solver and numeric integration, all in a pocket-sized case.

![HP 42S](../img/42s-640.webp)
The 42S as saturnus draws it, with π in the X register.

## At a glance

| | |
|---|---|
| Released | 31 October 1988, at $120 |
| Discontinued | 1995 or 1996 (sources differ) |
| Code name | Davinci |
| Processor | Saturn core in HP's Lewis chip, about 1 MHz |
| Memory | 8 KB RAM (over 7,200 bytes for you), 64 KB ROM |
| Display | Two lines of 22 characters, 131 × 16 pixels |
| Keyboard | 37 keys, one shift key; the top row doubles as the menu keys |
| Input and output | Infrared output to HP's 82240A printer, beeper |
| Power | Three button cells |
| Size | 148 × 80 × 15 mm |
| Entry | RPN, a four-level stack |

## History

### The HP-41's successor

The 42S, introduced in October 1988, was designed to run the HP-41C's programs. The Museum of HP Calculators sums it up: it lacked the HP-41C's expandability, but offered a two-line dot-matrix display with menus, more speed, a smaller size and a lower price.

The owner's manual promises that all programmable functions of the HP-41C and 41CV are built in, so their programs run on the 42S. Programs have to be keyed in by hand: there is no card reader and no way to load them from a computer. Not every extended function of the 41CX is there. A chapter of the manual explains the few differences, such as the larger display, the longer Alpha register and the greater number range, which can trip up an old program.

Wikipedia notes that, lacking the 41's expandability and input and output, the 42S was marketed as a replacement for the HP-15C rather than for the 41.

### The Pioneer series

The 42S belongs to HP's Pioneer series, slim calculators built around Lewis, a custom chip with an improved Saturn processor core. The [27S](27s.md), the [17B](17b.md) and later the [17BII](17bii.md) share its case and board. Of these, the 42S is the RPN scientific and the one you can program.

HP sold it at $120 for its whole life. Finseth's calculator data gives March 1996 as the end of production; the Museum of HP Calculators and Wikipedia give 1995.

### A bug that came back

A bug report from 1991, kept in Finseth's data: ask COMB or PERM for an impossible value and you correctly get "Invalid Data", but after swapping the arguments the error comes again. According to John W. Loux, early 42S calculators had the problem, a fix removed it, and a later update brought it back: it resurfaced in late revision B calculators and all of revision C. Any arithmetic operation clears it.

### Free42 and the DM42

The 42S never had a direct successor. In 2004 Thomas Okken released Free42, a re-implementation of the 42S and its printer for phones and computers. It is a complete rewrite that uses no HP code and needs no ROM, and it runs 42S programs.

In 2017 the Swiss maker SwissMicros announced the DM42, a calculator modelled closely on the 42S whose firmware is based on Free42.

## What makes it special

### Menus on two lines

The bottom line of the display labels the top row of keys. The manual counts over 350 built-in functions; most are in menus rather than on the keyboard. Menus have submenus and several rows, moved through with the arrow keys, and the EXIT key goes back one level. A CUSTOM menu takes your own functions and programs, as the HP-41's User keyboard did.

Holding a key shows the name of its function. Hold it for about a second and NULL replaces the name: let go then and the function does not run. Let go before NULL and it runs.

### Complex numbers, matrices and the solver

Complex numbers sit in a single stack register and appear by themselves where needed, for example as the square root of a negative number. Finseth lists the 42S as the first HP calculator to show them in polar notation as well as rectangular.

Matrices have an editor, and the matrix menu solves simultaneous linear equations. The solver finds the root of a program for any of its variables, and the integrator calculates definite integrals of a program. Both work on programs that declare their variables with MVAR.

### Registers and variables

The 42S has both the HP-41's numbered registers and named variables. Registers start at 25 and grow as far as memory allows; they are really a matrix called REGS. Variables can hold complex numbers and matrices. Strings are limited to six characters on the stack, as on the HP-41, while the Alpha register holds 44.

### Printing

The infrared port sends to HP's 82240A printer. The interface is one way: the manual explains that the calculator cannot tell if a printer receives the signal, so you switch printing on with PRON and off with PROFF. There is no other input or output.

### Hidden things

A memory editor is built in. Jay B. Harlow described in 1990 how to reach it with a key combination, and a post of 1993 found the same editor in the 17B, 17BII and 27S.

Takayuki Hosoda showed in 2007 how to upgrade the 42S to 32 KB of memory, by replacing the 8 KB RAM chip and changing jumpers, and how to double its speed with a new crystal.

## In saturnus

saturnus runs the 42S with ROM revision C:

- It boots, computes, and the ROM check of its own self-test passes.
- The keys act on press and hold as on the real calculator: a held key shows its function's name, and NULL after about a second.
- On your computer's keyboard, F1 to F6 press the menu keys and Escape is EXIT.
- The CPU runs at 1 MHz, the figure the sources give. No timing of a real 42S has been measured to check it against, so program run times are an estimate. 2×, 4× and Max speed it up.
- Save and load states work as on every model.

What it does not do: the 42S has no serial port, so Files has nothing for it, and the infrared printer output is not emulated. The memory view and the RPL editor are for the HP 48 and 49 only. The 42S has no clock, so "Set the clock" does not apply.

The [command reference](commands.md#42s) lists the 42S's 277 functions with the keys that run them, and examples for 89 of them, run in saturnus.

[Open the HP 42S in saturnus](../app/#/calculator/42s)

## Sources

- [HP 42S Owner's Manual](https://literature.hpcalc.org/community/hp42s-om-en.pdf): the features, over 7,200 bytes of memory, over 350 functions, the HP-41C/CV compatibility and its differences, the 82240A printer and the one-way interface, the held key and NULL (p. 75).
- [Finseth's HP calculator data: HP 42S](https://www.finseth.com/hpdata/hp42s.php): dates and price, code name, display, RAM and ROM, processor, power, polar complex notation as a first, the COMB and PERM bug, Harlow's description of the memory editor.
- [Finseth's HP calculator data: HP 17B](https://www.finseth.com/hpdata/hp17b.php): the 1993 post on the memory editor in the 17B, 27S and 42S.
- [Museum of HP Calculators: HP-42S](https://www.hpmuseum.org/hp42s.htm): the comparison with the HP-41C, menus and EXIT, registers and variables, strings and the Alpha register, complex numbers, years.
- [Wikipedia: HP-42S](https://en.wikipedia.org/wiki/HP-42S): marketing as an HP-15C replacement, size, end of production.
- [Wikipedia: HP-28 series](https://en.wikipedia.org/wiki/HP-28_series): Lewis as a custom chip with an improved Saturn core.
- [Wikipedia: HP-27S](https://en.wikipedia.org/wiki/HP-27S): the 37-key keyboard of the Pioneer series.
- [Takayuki Hosoda, upgrading the memory of the HP 42S to 32 KB](http://www.finetune.co.jp/~lyuka/interests/calc/hp42s/): the memory upgrade and the double-speed crystal.
- [Thomas Okken, Free42](https://thomasokken.com/free42/): what Free42 is; its [history](https://thomasokken.com/free42/history.html) for release 1.0 in November 2004.
- [David Griffith, "New HP42s clone almost available" (cctalk, March 2017)](https://classiccmp.org/pipermail/cctalk/2017-March/033100.html): the DM42's announcement.
- [EEVblog #1159](https://www.eevblog.com/2018/12/17/eevblog-1159-worlds-most-precise-pocket-calculator/): the DM42 as a 42S clone with firmware based on Free42.
