HP 42S/DM42/Free 42: Two Functions Programmed Three Different Ways
Introduction
In 1979, Electro Scientific Industries (esi) released the (rare) ESI Calcumeter 4100 which is a combination multimeter and RPN calculator. I’m going to focus on the calculator part.
The calculator is a standard RPN calculator with the following functions: x^2, √, 1/x, 10^x, e^x, LN, log, and y^x. Also present are the standard ↓ROLL (roll down) and x<>y (swap) functions. Then we have other unique function such as:
mx+b: Applies a linear regression model to a measurement, with m stored in memory and b is grabbed from the y-registered
dBV: Decibel measurement (volt): 20 * log(measurement ÷ memory) (measurement is probably in the X register)
%DEV: percent change of a measurement from the value stored in memory:
100 * (measurement – memory) ÷ memory
AVG: average of cumulative amount of measurements against the value stored in memory
xy/(x+y): calculates x * y ÷ (x + y)
xy/(x – y): calculates x * y ÷ (x – y)
Getting this multimeter combo was not inexpensive, it had a retail price of $399 in 1979.
Today’s blog will focus on two of these functions, particularly xy/(x+y) and xy/(x-y).
The Functions xy/(x+y) and xy/(x-y)
As I could gather from the calculator’s keyboard:
xy/(x+y): Multiply Over Plus*
MOP(x,y) = (x * y) ÷ (x + y) = 1/(1/y + 1/x)
xy/(x-y): Multiply Over Subtract*
MOP(x,y) = (x * y) ÷ (x - y) = 1/(1/y – 1/x)
* These are my names for these functions. I don’t have the manual. Here I am assuming that the stack is in the traditional order: X is the display, Y is the stack just above X, and the RPN works like any (HP) RPN calculator.
All programs are made using the Free42 app (42S/41C family).
Stage 1: The Long Way
This starts out by duplicating x and y first until we have the stack as follows: Y, X, Y, X.
00 { 19-Byte Prgm }
01▸LBL "MOP"
02 ENTER
03 ENTER
04 CLX
05 -
06 R↓
07 X<>Y
08 +
09 R↓
10 ×
11 R↑
12 ÷
13 RTN
14 END
00 { 19-Byte Prgm }
01▸LBL "MOS"
02 ENTER
03 ENTER
04 CLX
05 -
06 R↓
07 X<>Y
08 -
09 R↓
10 ×
11 R↑
12 ÷
13 RTN
14 END
Stage 2: What if we assume x and y are nonzero?
Let n = (x * y) ÷ (x ± y)
Then:
1/n = (x ± y) ÷ (x * y)
1/n = x ÷ (x * y) ± y ÷ (x * y)
1/n = 1/y ± 1/x
n = 1/(1/y ± 1/x)
00 { 14-Byte Prgm }
01▸LBL "MOAR"
02 1/X
03 X<>Y
04 1/X
05 +
06 1/X
07 RTN
08 END
00 { 15-Byte Prgm }
01▸LBL "MOSR"
02 X<>Y
03 1/X
04 X<>Y
05 1/X
06 -
07 1/X
08 RTN
09 .END.
Shorter.
Stage 3: Using Stack Storage Operations (41C/42S only)
The HP 41C and 42S families allow us to use stack levels (X, Y, Z, T, and L) as storage registers. Let's see if we can take advantage of this.
00 { 17-Byte Prgm }
01▸LBL "MOP42"
02 STO ST Z
03 X<>Y
04 STO× ST Z
05 +
06 ÷
07 RTN
08 END
00 { 17-Byte Prgm }
01▸LBL "MOS42"
02 STO ST Z
03 X<>Y
04 STO× ST Z
05 -
06 ÷
07 RTN
08 END
Sources
Electro Scientific Industries, Inc. “Calcumeter 4100” Ad/Pamphlet Micrometrics, Inc. Portland, OR. 1979
Sanden, Kees van der. “The ESI Calcumeter 4100” https://www.keesvandersanden.nl/calculators/esi4100.php Retrieved June 19, 2026.
I hope you enjoyed our deep dive. See you next time,
Eddie
All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.