HP-42S Reference the 1988 Pioneer that succeeded the HP-41 · 196 entries, grouped by the menu they live in

The HP-41 rethought around a two-line display: the same RPN stack with Y now visible, named variables of any type, complex numbers and matrices as single objects, a root finder and integrator that turn a program into a form, curve fitting, 36-bit base arithmetic and a bitmap you can draw on — all from 37 keys through seventeen menus. This sheet is the keyboard drawn to the machine's proportions, a working guide to how it thinks, then an index of every function by the menu it is found in, with the orange shift written as the way the key is: blank. Hover any entry for the full description, its parameter and its manual page.

the orange shift key · LABEL a menu label on the top row
Source: HP-42S RPN Scientific Calculator Owner's Manual, edition 7 (HP, 1988–89); page numbers are its printed pages and the Operation Index (pp. 310–335) supplies each function's keystrokes, parameter and page. Function names cross-checked against Free42's command table — see the foot of this page.
Colour keythe machineentry, stack & displayprogrammingmathematicsdata objectssymbolic, solvers & financevariables & memoryinput, output & interfaceplotting & graphicsreference & system

The Keyboard

37 keys · one shift · 17 menus · drawn to the proportions of the machine
hpHEWLETT
PACKARD
42SRPNSCIENTIFIC
▼▲PRINT((•))RADGRAD
y: 141.0000x: 42.0000
Σ+Σ-SUMMEANWMNSDEV
Σ−1Σ+
yx21/x
x23√x
10x4LOG
ex5LN
GTO6XEQ
COMPLEX7STO
%8RCL
π9R↓
ASIN10SIN
ACOS11COS
ATAN12TAN
ALPHA13ENTER
LAST x14x≷y
MODES15+/−
DISP16E
CLEAR17
BST18
SOLVER197
∫f(x)208
MATRIX219
STAT22÷
SST23
BASE244
CONVERT255
FLAGS266
PROB27×
 28 
ASSIGN291
CUSTOM302
PGM.FCN313
PRINT32
OFF33EXITON
TOP.FCN340
SHOW35·
PRGM36R/S
CATALOG37+

Thirty-seven keys and a second line

Every key does two jobs — the white legend on the cap, and the orange legend on the case above it after the blank orange shift key. The orange legends in shaded boxes are not functions but menus: press one and the six keys of the top row are relabelled by the lower line of the display. That is the whole design of the 42S: the 41 had four keyboards and a catalog, the 42S has one keyboard and menus.

plain
the white legend on the key
then key
the orange legend printed above it
menu label
while a menu shows, the six top-row keys run whatever label sits over them
ALPHA
a menu too: letters in groups of four or five, shift for lowercase

EXIT backs out of one menu level, or cancels a prompt, or stops a program; shifted it is OFF, and ON is printed beneath it because it is also the power key. and page through a menu with more than one row; with no menu showing they are BST and SST.

Hold any key down and the display previews the function without executing it; keep holding until NULL appears and nothing happens. The small number in each cap is what GETKEY returns for it — 1 to 37, or 38 to 74 shifted.

The two annunciators worth learning early are ▼▲ (this menu has more rows) and the shift box (the orange key is pending).

orange, reached with the shift key — printed on the case above the keya shaded box means the legend opens a menu on the top rowthe key number, as GETKEY returns it

HP-42S Guide

the machine, and how to make it do things

Anatomy five things worth seeing laid out

The stack, two levels showing

Four registers — T, Z, Y, X — hold the working numbers, and this is the first HP that shows two of them: the display’s upper line is Y, the lower is X. Every function takes its arguments from the bottom of the pile and drops the answer back into it. LAST X keeps whatever X held before the last operation.

key 4
T
Z
Y
X4
stack lifts on the next entry
ENTER
T
Z
Y4
X4
X copied to Y, lift disabled
key 3
T
Z
Y4
X3
writes over X, no lift
×
T
Z
Y
X12
Y and X consumed, stack drops

The two shaded rows are what you see. Because Y is visible, the ENTER idiom finally makes sense to a newcomer: press it and the number visibly moves up a line. Only ENTER, CLX, Σ+ and Σ- disable stack lift (flag 30); after any of them the next number writes over X.

When a menu is showing, its labels take the lower line and only X is displayed. Press EXIT to get Y back.

One pool of 8,192 bytes

There is no SIZE boundary to manage in the 41 sense. System memory, the stack, the 44-character Alpha register and the 100 flags take a fixed slice; everything else is one pool that variables fill from one end and programs from the other, with about 7,200 bytes free on a cleared machine.

fixedgrows →← growssystemvariablesfreeprogramsnamed valueslabels to .END.
REGSa 25×1 matrix — R00 … R24the numbered registers are one matrix; SIZE redimensions it

Numbered registers still exist for HP-41 habits and for indirect addressing, but they are the elements of one matrix called REGS. That is why SIZE can be anything memory allows, why Size Error rather than NONEXISTENT is the complaint, and why STO 05 and STO "X" are the same instruction with two kinds of parameter.

The loop counter

ISG and DSE read a single register or variable as three packed fields — counter, limit and step — so a whole for loop lives in one number. It is written ccccccc.fffii, and the counter has seven digits here where the 41 had five.

counterlimitstep0000001.01000starts hereruns while ≤ thisblank = 1

ISG adds the step and skips the next line once the counter exceeds the limit; DSE subtracts and skips once it is less than or equal to it. The skipped line is normally the GTO that closes the loop, so a loop ends by skipping its own branch.

1.010 counts 1 to 10 by ones; 1.13102 counts 1, 3, 5 … 131 — every other pixel column across the display.

The display is a bitmap

Two lines of 22 characters, but underneath it is 131 × 16 pixels and the machine will let you draw on it: PIXEL lights one dot, a negative coordinate draws a whole row or column, AGRAPH paints an image whose columns are the characters of the Alpha register, and PRLCD prints whatever is there.

131 columns, numbered from the leftline 1 — y: or a messageannunciators above
line 2 — x: or six menu labelseach label 21 pixels wide16 rows, numbered from the top · 8 rows per text line

A menu label is five characters at most, which is why WMEAN shows as WMN and PRON as PON — the label and the name a program uses can differ. The ▼▲ annunciator means the menu has more rows.

The Alpha register

Forty-four characters, kept apart from the stack, and this time strings are also data: a variable or a matrix element can hold one. The register is where prompts are built, where ARCL formats numbers into text, and where a program keeps a name before it becomes a parameter.

shown — 22 charactersscrolled off, marked by ..44 characters; a beep at the 45th, then the first falls off the left

Typing into Alpha replaces what is there; press first to turn the cursor on and append instead. ASTO saves six characters to a variable; ATOX and XTOA move a character at a time; AVIEW shows it, PROMPT shows it and waits.

The machine

The HP-42S of 1988 is the HP-41 rethought for a machine with a two-line dot-matrix display and no ports. It runs HP-41 programs, keeps the Alpha register and the flags, and adds the things the 41 needed plug-ins or synthetic programming for: named variables, complex numbers, matrices as objects, a root finder, a numerical integrator, curve fitting, base arithmetic and pixel graphics. Everything is reached from 37 keys through menus.

It is a Pioneer — the same case as the 17B, 27S and 32S — with about 7,200 bytes free, three coin cells that last a year, and an infrared port for the 82240 printer. There is no other I/O, which is the one thing its admirers have always held against it.

It stayed in the catalogue until 1995 and has never been replaced. Free42 and the SwissMicros DM42 exist because of that; see Reading more.

The display and its menus

The top line is Y or a message, the bottom line is X or six menu labels. A menu key relabels the top row of keys; press the key under a label to run it. Menus with more than one row light the ▼▲ annunciator, and ▲▼ page through them.

PROBCOMB PERM N! GAMMA RAN SEED across the top row5 N!x: 120.0000 — and the menu exits PROB PROBselect it twice and it stays until EXIT MODESDEG■ RAD GRAD RECT■ POLAR — ■ marks the setting in force

Two kinds. Function menus (CLEAR, CONVERT, PROB, DISP, FLAGS, MODES, PGM.FCN, PRINT, CATALOG, CUSTOM, TOP.FCN, ALPHA) exit as soon as you use one function. Application menus (BASE, MATRIX, SOLVER, STAT, ∫f(x)) stay until you leave, and remember themselves under a function menu you open on top.

A label is at most five characters, so the label and the function’s name can differ: WMN is WMEAN, PON is PRON. The index below gives both.

Keying in

Digits, ·, E for an exponent, +/− for the sign of whichever part you are in. While the cursor _ is showing, deletes a character; once entry ends it clears X instead. SHOW, held, reveals all twelve digits whatever FIX is set to.

1 2 3 . 4 5x: 123.45_E 6 +/−x: 123.45E-6_ENTERy: 0.0001 / x: 0.0001 — entry ends, copied up SHOW1.2345E-4 while held

Text is typed through the ALPHA menu: pick a letter group, press the letter; shift first for lowercase. It is slower than the 41’s Alpha keyboard and you will not do much of it — INPUT and VIEW show a variable’s own name, so most programs never need a prompt string at all.

The stack

Four registers, X and Y both visible. Two-number functions take Y and X and drop the stack; one-number functions replace X. LAST x holds the previous X.

2 ENTER 3 +x: 5.0000 LAST xx: 3.0000 — the operand, still thereR↓roll the whole stack downx≷yswap the bottom two CLEAR CLSTall four to zero

Only ENTER, CLX, Σ+ and Σ− disable stack lift. After any of them the next number overwrites X instead of pushing it up — the behaviour you want after ENTER, and a trap everywhere else. Stack levels can be named as parameters: STO ST Z, RCL ST T, X<> ST L for LAST X.

A dropped stack copies T into Z, so a constant in T is a constant forever: fill the stack with 1.5 and press × repeatedly for compound growth.

Variables and registers

The 42S stores by name. STO "AREA" creates a variable called AREA holding whatever X is — a real, a string, a complex number or a matrix. The type follows the value; nothing is declared. Numbered registers survive as the elements of the matrix REGS, whose length is SIZE.

STO ABCDE A R E A ENTERstore X in a variable called AREARCLthe menu shows your variables — press oneSTO + 0 7add X to R07; the result stays in the registerRCL × 0 7multiply X by R07 without disturbing YSTO . 0 5IND: the register whose number is in R05 CATALOG REALevery real variable and string, as a menu

STO arithmetic leaves the answer in the register; RCL arithmetic brings it to X. Having both is a small thing that makes running totals and scaling a one-line affair. The . key in a parameter prompt means IND, and IND can point at a register or at a variable holding a name.

CLV deletes a variable and gives its bytes back; CLRG zeroes REGS. There is no variable catalog to run out of — only memory.

Finding and running functions

Far more functions than key legends, so there are four ways to reach one.

CATALOG FCNevery function alphabetically; ▲▼ scroll, hold to flyXEQ ABCDEENTERtype the name — any function or program ASSIGN FCN … [ ]put it on one of the 18 CUSTOM keys CUSTOMyour menu, three rows; it does not auto-exit TOP.FCNΣ+ 1/X √X LOG LN XEQ as labels, for when an application has the keys

Prompts take parameters. A numeric prompt shows one cursor per digit (FIX __); key them all, or fewer then ENTER. An Alpha prompt offers the variable or label catalog as a menu, or ALPHA to type. · at a prompt makes it indirect; R↓ at a register prompt offers the stack levels.

Hold a key to preview its function; hold on until NULL and it is cancelled. Menus, catalogs and CUSTOM all obey this.

Numbers and modes

Twelve digits, exponents to ±499, and every number is decimal: 0.1 is exactly a tenth. DISP sets what you see; nothing you do there changes what is held.

DISP FIX 2two decimals DISP ALLevery significant digit, up to twelve DISP RDX,European radix; the separators swap MODES RADradians — flags 42 and 43 CONVERT →HMS1.50001.3000: an hour and a half CONVERT RNDmake the number match the display

Two modes are easy to miss. REALRES (MODES, second row) makes √−1 an error rather than (0,1) — HP-41 programs expect that. And Σ+ uses the summation registers inside REGS from ΣREG (11 by default) upward, so a SIZE smaller than 17 breaks statistics with Size Error.

Complex numbers

A complex number is a single object in X. Make one with COMPLEX from two reals (Y then X); split it the same way. The arithmetic keys, powers, roots, logs and trig all accept it. RECT and POLAR in MODES only change the notation.

3 ENTER 4 COMPLEXx: 3 i4 MODES POLARx: 5 ∡53.1301 — same number COMPLEXback to two reals, in the current mode CONVERT ABSmagnitude; SIGN gives the unit vector

Two complex numbers are a pair of 2-vectors as far as DOT and CROSS in the MATRIX menu are concerned — the manual’s chapter 6 does vector arithmetic entirely this way. A complex value can be stored in a variable, a REGS register or a matrix element like any other.

With CPXRES set (the default) real inputs may give a complex answer: √ of −4 is 0 i2. Flag 74 records the choice.

Programs

A program is the keystrokes you would have pressed, recorded. PRGM toggles Program-entry mode; the display becomes the listing, one line at a time, with the current line on the bottom row. GTO . . first, so you start a fresh program at the end.

PRGM00 { 0-Byte Prgm }GTO . .to the end of memory: a new program PGM.FCN LBL ABCDE A R E A ENTER01▸LBL "AREA"the body PRGMback out; the END is suppliedXEQ AREArun it — programs appear as a menu

Labels: global Alpha names of one to seven characters, seen by XEQ, GTO and the catalog; local numeric 00–99 and the letters A–J and a–e, private to the program and cheap — one or two bytes against four plus the name. Local Alpha labels have a bonus: with LCLBL set, the CUSTOM menu shows them, so the top row runs your routines.

Eight pending returns. ▲ and ▼ are BST and SST in Program-entry mode; deletes the line; DEL in CLEAR deletes many; SHOW reveals a long one.

Talking to a person

This is where the second line earns its keep. INPUT shows a variable’s name and current value and waits; whatever is keyed is stored on R/S. VIEW shows a named result. Neither needs a prompt string.

INPUT "R"R? / x: 10.0000 — type a new value or accept itVIEW "V"V=1,570.7963"DONE" AVIEWa message, from the Alpha registerPROMPTshow Alpha and halt for R/SCF 22 … FS?C 22did they actually key a number?

Better still is a variable menu: put MVAR "R" and MVAR "H" after the label and VARMENU puts R and H on the top row — press to store, shift-press to recall — exactly as the Solver does. MENU with KEYX/KEYG definitions goes further and makes the top row branch to your own labels, so a program becomes an application.

Flag 21 decides whether VIEW and AVIEW halt or print; with no printer, leave it clear.

Branching and loops

Every test skips one line if it is false, so the line after a test is the “true” branch — almost always a GTO or XEQ. From the keyboard a test answers Yes or No.

X<Y?PGM.FCN second row, X?Y submenuGTO 01the true branchFS?C 25did the last instruction fail? — and reset the trapREAL?is X a real number? (also CPX? STR? MAT?)

Counted loops live in one register or variable as ccccccc.fffii. ISG counts up, DSE down, and each skips the next line when finished.

1.131 STO "C"count 1 to 131LBL 02top of the loopRCL "C" IP 8 PIXELone dot per column, row 8ISG "C"bump; skip when past 131GTO 02the line that gets skipped

Flag 25 is the only error handling: set it, try the thing, then ask FS?C 25. If it is still set nothing went wrong.

The Solver

Write the equation as a program that leaves f = 0 in X, name its variables with MVAR, and the SOLVER menu does the rest: it lists programs that have MVARs, then shows their variables as a menu. Store what you know, press what you want.

SOLVER CYLV R H on the top row10 R 5 Hthe knownsVV=1,570.7963 — solved2000 V 5 H RR=11.2838 — any variable, same program7 R 12 Rtwo guesses: store one, key the other, press

It solves for any of the variables, which is why the equation is written as a difference rather than an assignment. When it cannot, it says so — Extremum, Sign Reversal, Constant?, Bad Guess(es) — and leaves its best value in X. PGMSLV and SOLVE are the same steps under program control.

A Solver program may call ∫f(x) and an integrand may call the Solver, but neither may call itself. Flag 45 is set while solving.

Integration

The same idea: a program with MVARs that leaves f(x) in X. ∫f(x) asks which program, then which variable is the one to integrate over, then shows LLIM ULIM ACC and the other MVARs so you can set the constants.

∫f(x) BSSLchoose the programXintegrate with respect to X0 LLIM π ULIM .001 ACClimits and accuracy∫=… — the ∫ label appears after the limits are set

ACC is a relative accuracy and the price of a tighter one is exponential: the Romberg method doubles its samples for each extra digit. Set ACC to the accuracy of your data, not to zero. PGMINT and INTEG do it from a program, and flag 46 is set while it runs.

Matrices

A matrix is a value like any other: it sits in X or in a variable, and the arithmetic keys work on it. NEW makes a y×x matrix of zeros in X; DIM makes or resizes a named one. The Matrix Editor is how you fill it.

3 ENTER 3 MATRIX NEWx: [ 3×3 Matrix ]EDIT1:1=0.0000 — the editor, arrows on the top row2 5 key a value, move right; ▼ for the next rowEXITback to the stack with the matrixSTO ABCDE M ENTERname itINV DET TRANfirst row of the menu; × and ÷ do matrix arithmetic

SIMQ creates MATA, MATB and MATX for a linear system and solves it when you press MATX. INDEX names a matrix for the element functions — STOEL, RCLEL, I+, J+, STOIJ — which is how a program walks one. GROW lets the editor add rows as you type past the end, so a data list can be built without knowing its length.

Elements may be reals, strings or complex; COMPLEX joins two real matrices into one complex one. REGS is the matrix the numbered registers live in.

Statistics and curve fitting

Σ+ accumulates x from X and y from Y into the summation registers, which are REGS from ΣREG upward — six of them, or thirteen in ALLΣ mode, which the nonlinear fits need. Mistyped a pair? Key it again and press Σ−.

STAT ALLΣthirteen registers: all four models available2 ENTER 1 Σ+x: 1.0000 — n so far (y first, then x) STAT MEANx̄ to X, ȳ to Y STAT CFIT MODL BESTpick the model with the best correlationFCSTYy for the x in X, on that modelCORR SLOPE YINThow good, and the line

Four models: linear, logarithmic, exponential, power; BEST tries all four. Flags 56–59 record the choice and 61–63 which models the data has ruled out. Data already in a matrix can be used without re-keying by making that matrix REGS.

Base arithmetic

BASE is an application: BINM OCTM DECM HEXM set the mode, and in any nondecimal mode the arithmetic keys become 36-bit two’s-complement integer operations. The LOGIC submenu has AND OR XOR NOT BIT? and ROTXY.

BASE HEXMx: 2A — the same 42, shown in hex F F +A–F on the second row; 2A + FFLOGIC ANDbitwiseDECMand back; the number never changed

A value beyond 36 bits shows as <Too Big> — a number, not an error; SHOW reveals it. →DEC and →OCT in the catalog are unrelated: they are the HP-41’s DEC and OCT, kept for its programs.

Printing and graphics

The printer is the 82240, by infrared, and it needs PON before anything happens: flags 21 and 55 set. Then VIEW and AVIEW print instead of halting, TRACE records every keystroke and result, PRP lists a program and PRLCD prints the display pixel for pixel.

PRINT PONprinting on PRINT TRACEkeystrokes and results as they happen PRINT PRPlist a program — the way to get one on paper CLEAR CLLCDblank the display for drawing66 ENTER 8 PIXELone dot, centre of the screen PRINT PRLCDprint the picture

The manual’s DPLOT and PLOT programs (chapter 10) plot any Solver-style function on the display or the printer, and are worth typing in once. AGRAPH paints a bitmap from the Alpha register — each character is an eight-pixel column — with flags 34 and 35 choosing OR, overwrite, clear or XOR.

HP-41 programs

Type one in as written and it will almost always run. The differences that matter (chapter 11): the 42S has no USER keyboard, so key assignments become CUSTOM menu assignments; the Alpha register is 44 characters not 24; numbers reach 10499; and a real function with a complex result gives an answer rather than an error unless you set REALRES.

MODES RRESHP-41 numeric behaviourDEC OCTare →DEC →OCT hereCHS EEXare +/− and E — same keys, new legendsSF 25 … FS?C 25works exactly as before

Names typed by XEQ follow the 41’s (page 171 has the table); a few are renamed and the statistics registers are REGS 11–16 by default rather than a ΣREG you must set. Programs are not packed and byte counts differ, so a 41 program that just fitted may not.

The Programming Examples and Techniques book has a chapter on enhancing 41 programs with menus and named variables — the point of moving them.

When it complains

Messages replace the top line and disappear on the next key; clears one without doing anything else. Read each as a statement about which assumption failed.

Alpha Data Is InvalidA numeric function met a string in a register or stack level. SIGN returns 0 for a string and is the way to check first.
Invalid DataThe argument is outside the function's domain — √ or LN of a negative with REALRES set, an out-of-range date-style value, a bad flag number.
Invalid TypeReal, complex or matrix where another was expected.
NonexistentThe variable does not exist, or a matrix utility was used with nothing indexed.
Size ErrorA storage register beyond SIZE, or a summation register that ΣREG points past the end.
Out of RangeThe result exceeded ±9.99999999999E499 and flag 24 was clear.
Dimension ErrorMatrices that do not conform, a determinant of a non-square matrix, a dimension ≤ 0, or a pointer moved outside the matrix.
Divide by 0
Label Not FoundGTO or XEQ named a label that is not in memory.

Set flag 25 before an instruction that may fail and the error is swallowed, the instruction skipped and the flag cleared; FS?C 25 afterwards tells you what happened. Flag 24 turns an Out of Range into ±9.99999999999E499 and carries on. That is the whole error-handling story, and it is enough.

Reading more

The Owner’s Manual (362 pages) is one of HP’s best: chapters 1–7 are the machine, 8–11 programming, 12–16 the applications, and the Operation Index (pp. 310–335) is the alphabetical reference this sheet is built from. The companion Programming Examples and Techniques book carries the longer programs and the HP-41 conversion chapter.

The machine lives on twice over. Free42 by Thomas Okken is a from-scratch re-implementation for every desktop and phone, with a decimal build that is more accurate than the original; Plus42 extends it with a larger display and algebraic equations. The SwissMicros DM42 is Free42 in an HP-style aluminium case, and the DB48X firmware on the same hardware is a different machine entirely — see its sheet.

The keyboard here was drawn from the manual’s cover photograph and the Free42 skin of the real machine; the function names were checked against Free42’s command table, because the scan prints menu labels as noise.

Flags

100 switches · 00–10 and 81–99 are yours, 11–35 control the machine and may be set, 36–80 report on it and may only be tested
00–10user flags — Yours; nothing inside the machine reads them. Kept across off, cleared by a memory clear.
11automatic execution — Set it and switch off: the current program runs when the machine is next switched on, and the flag clears.
12 / 13printer double-wide / lowercase
15 / 16print mode — Both clear MAN; 16 alone NORM; 15 set TRACE.
21printer enable — Set: VIEW and AVIEW print and carry on. Clear: they display and, in a program, halt. PON sets it with 55.
22 / 23numeric / Alpha input — Set when a number (or characters) have been keyed since the flag was cleared — clear them before a prompt, test them after.
24range errors ignored — Overflow returns ±9.99999999999E499 and continues; 36-bit overflow returns the largest value. Stays set.
25one error ignored — The next error is swallowed and the flag clears itself; the failing instruction is skipped. Set it, try the thing, then FS?C 25 to ask what happened.
26audio — Clear it and BEEP, TONE and the keyboard beep are silent. QUIET toggles it.
27CUSTOM menu showing
28 / 29radix period / separators on — RDX. and RDX, set 28; clear 29 to drop the thousands separators.
30stack lift disabled — Set by ENTER, CLX, Σ+ and Σ−; cleared by nearly everything else.
34 / 35AGRAPH mode — Both clear: the image is ORed into the display. 35 alone: it overwrites that region. 34 alone: pixels already on are turned off. Both: XOR.
36–39display digits — A four-bit number, 36 most significant.
40 / 41display format — Both clear SCI; 41 ENG; 40 FIX; both ALL.
42 / 43angular mode — 42 GRAD, 43 RAD, neither DEG.
44continuous on — The auto-off is disabled. ON sets it.
45 / 46solving / integrating — Set only while the Solver or ∫f(x) is running — a program called by them can tell.
47variable menu active
48Alpha mode — AON and AOFF set and clear it.
49low battery
50 / 51message showing — 51 as well when it uses both lines.
52Program-entry mode
53INPUT in progress
55printer exists — PON sets it with 21; PROFF clears both. 55 says printing is possible, 21 that it is wanted.
56–59curve-fit model — LINF LOGF EXPF PWRF, one at a time.
60ALLΣ mode — Thirteen summation registers rather than six.
61–63invalid models — Which of LOGF, EXPF, PWRF the data so far rules out.
65Matrix Editor in use
66GROW mode
68–71base mode — All clear: decimal. Otherwise the largest digit allowed, as four bits.
72CUSTOM shows local labels — LCLBL sets it; an ASSIGN clears it.
73POLAR display
74real results only — REALRES sets it: √−1 is an error rather than (0,1).
75programmable menu selected — MENU sets it.
76 / 77matrix edge wrap / end wrap — Set by any pointer move that wrapped.
81–99user flags — The other nineteen of the thirty that are yours.

Setting or clearing a flag from 36 to 80 is a Restricted Operation; test them with FS? and FC?. Appendix C (pp. 273–282) has the full table with each flag’s state after a reset and after a memory clear.

Function Index

196 entries · grouped by the menu each function lives in, then the ones with no menu at all · hover for details

On the keyboard

31
+ − × ÷two-number arithmetic
+/−change sign
Eenter exponent
ENTERX → Y, stack lifts, lift disabled
backspace, or clear
R↓roll the stack down
X<>Yswap X and Y
1/X · √X · X↑2reciprocal, square root, square
LOG · 10↑X · LN · E↑Xlogarithms and exponentials
Y↑Xpower
SIN COS TANtrigonometry
ASIN ACOS ATANinverse trigonometry
π3.14159265359
%x percent of y
%CHpercent change
Σ+ / Σ−accumulate / remove a data pair
LASTXthe previous X
STO · RCLstore / recall
STO+ STO− STO× STO÷storage arithmetic
RCL+ RCL− RCL× RCL÷recall arithmetic
COMPLEXtwo reals ↔ one complex
XEQexecute by name or label
GTOgo to a label
R/Srun / stop
EXITleave the menu or the mode
▲ ▼other menu rows
SST / BSTsingle step / back step
ONcontinuous on
OFFswitch off
SHOWall twelve digits
PRGMProgram-entry mode

ALPHA

15
the ALPHA menu
AON / AOFFAlpha mode on / off
ASTOAlpha → register
ARCLregister → Alpha
AVIEWshow the Alpha register
PROMPTshow Alpha and stop
AIPappend the integer part of x
XTOAappend a character by code
ATOXleftmost character → X
ALENGlength of the Alpha register
AROTrotate Alpha by x characters
ASHFshift six characters out
POSAfind a character or string
CLAclear the Alpha register
AGRAPHdraw a graphics image

BASE

8
the BASE application
BINM / OCTM / DECM / HEXMbase mode
BASE+ BASE− BASE× BASE÷36-bit integer arithmetic
BASE+/−two's complement
AND / OR / XOR / NOTbitwise logic
BIT?test bit x of y
ROTXYrotate y by x bits
→DEC / →OCTHP-41 base conversion

CATALOG

5
six catalogs
CATALOG FCNevery function
CATALOG PGMprograms by global label
CATALOG REAL / CPX / MATvariables by type
CATALOG MEMavailable memory

CLEAR

13
CLΣclear the summation registers
CLPclear a program
CLVclear a variable
CLSTclear the stack
CLAclear the Alpha register
CLXclear X
CLRGclear the storage registers
DELdelete program lines
CLKEYSclear the CUSTOM menu
CLLCDblank the display
CLMENUclear the programmable menu
CLALLclear everything
CLDclear a message

CONVERT

9
→DEG / →RADradians ↔ degrees
→HR / →HMSH.MMSSss ↔ decimal hours
HMS+ / HMS−add / subtract in H.MMSS
→REC / →POLrectangular ↔ polar
IP / FPinteger / fractional part
RNDround X to the display format
ABSabsolute value
SIGN1, −1 or 0
MODremainder of y ÷ x

CUSTOM & ASSIGN

4
your own menu
ASSIGNput a name on a CUSTOM key
CLKEYSclear all assignments
KEYASN / LCLBLwhich CUSTOM menu

DISP

3
FIX / SCI / ENGdisplay format, n digits
ALLas many digits as needed
RDX. / RDX,radix mark

FLAGS

3
SF / CFset / clear flag nn
FS? / FC?test a flag
FS?C / FC?Ctest, then clear

MATRIX

22
matrices are objects
NEWMATcreate a y × x matrix in X
INVRTinverse
DETdeterminant
TRANStranspose
SIMQsimultaneous equations
EDIT / EDITNthe Matrix Editor
DOT / CROSSdot and cross product
UVECunit vector
DIMdimension a named matrix
INDEXindex a named matrix
STOIJ / RCLIJset / read the row and column pointers
STOEL / RCLELstore / recall the current element
PUTM / GETMsubmatrix in / out
I+ I− J+ J−step the pointers
→ ← ↑ ↓editor arrow functions
INSR / DELRinsert / delete a row
WRAP / GROWwhat happens at the last element
R<>Rswap two rows
FNRM / RNRMFrobenius / row norm
RSUMrow sums as a column matrix
DIM?rows to Y, columns to X

MODES

6
DEG / RAD / GRADangular mode
RECT / POLARhow complex numbers display
SIZEhow many storage registers
QUIETtoggle the beeper
CPXRES / REALREScomplex results allowed / forbidden
KEYASN / LCLBLwhich CUSTOM menu

PGM.FCN

24
LBLa label
RTNreturn
INPUTprompt for a value
VIEWshow a value
AVIEWshow the Alpha register
XEQcall as a subroutine
X?0 · X?Ythe comparison tests
ISG / DSEloop control
PSEpause about a second
PROMPTshow Alpha and halt
AIP · XTOA · AGRAPH · PIXELAlpha and graphics
PIXELturn on one dot
BEEP / TONEsound
MVARdeclare a menu variable
VARMENUshow a variable menu
GETKEYwait for a key
MENUselect the programmable menu
KEYX / KEYGdefine a menu key
CLMENUclear the programmable menu
ENDend of program
STOPhalt
REAL? CPX? STR? MAT?test the type of X
EXITALLleave every menu
OFFswitch off from a program

PRINT

9
the infrared printer
PRΣ · PRP · PRV · PRSTK · PRA · PRXprint statistics, a program, a variable, the stack, Alpha, X
PRUSRprint all variables and programs
LISTprint n program lines
ADVadvance the paper
PRLCDprint the display
DELAYprint delay in seconds
PRON / PROFFprinting on / off
MAN / NORM / TRACEprint mode

PROB

5
COMB / PERMcombinations / permutations
N!factorial
GAMMAΓ(x)
RANrandom number
SEEDseed the generator

SOLVER & ∫f(x)

7
programs as functions
PGMSLVselect the program to solve
SOLVEsolve for a variable
PGMINTselect the program to integrate
INTEGintegrate with respect to a variable
LLIM / ULIM / ACClimits and accuracy
Extremum · Sign Reversal · Constant? · Bad Guess(es)what the Solver says when it cannot

STAT

12
Σ+ / Σ−accumulate / remove
SUMΣx to X, Σy to Y
MEANmeans of x and y
WMEANweighted mean
SDEVsample standard deviations
CFITcurve fitting
LINF / LOGF / EXPF / PWRF / BESTthe fitting model
FCSTX / FCSTYforecast
SLOPE / YINT / CORRslope, intercept, correlation
ΣREG / ΣREG?where the summation registers start
ALLΣ / LINΣ13 or 6 summation registers
CLΣclear the summation registers

TOP.FCN

1
the top row, as a menu

Catalog only

19
no key, no menu
SINH COSH TANHhyperbolics
ASINH ACOSH ATANHinverse hyperbolics
LN1+X / E↑X−1logarithm and exponential near zero
%CHpercent change
HMS+ / HMS−H.MMSS arithmetic
→DEC / →OCTHP-41 base conversion
R↑roll the stack up
X<>swap X with a register or variable
CLDclear a message
EXITALLleave all menus
OFFprogrammable off
AON / AOFFAlpha mode on / off
ALENG · AROT · ASHF · ATOX · POSAAlpha string functions
REAL? CPX? STR? MAT?type tests
DIM? · FNRM · RNRM · RSUM · OLD · R<>Rmatrix extras
I+ I− J+ J− → ← ↑ ↓pointer stepping
END · STOPin listings
KEYASN · LCLBLalso in MODES

Worked Example — a cylinder, solved three ways

twelve lines that give the Solver a menu and answer for whichever variable you leave blank
01▸LBL "CYL"a global label; the ▸ marks a label line in the listing
02 MVAR "V"the three variables the menu will offer, in menu order
03 MVAR "R"
04 MVAR "H"
05 RCL "R"πR²H − V: the equation written as a difference
06 X↑2
07 PI
08 ×
09 RCL "H"
10 ×
11 RCL "V"
12 -zero when the variables agree
13 .END.supplied by the machine

Each box is the display as you would see it in Program-entry mode, one line at a time. Global labels and variable names are shown in quotation marks on this machine; a local label would not be. The ▸ after the line number marks a label line, and .END. is the permanent end of program memory that the last program borrows.

This is the smallest program that shows what the 42S added to the 41. Three lines of it — the MVARs — do no arithmetic at all. They tell the machine which variables the equation has, and from that alone the SOLVER builds a menu, prompts by name, and solves for any one of them.

The equation. A cylinder has V = πR²H. The Solver wants f(V, R, H) = 0, so the program computes πR²H and subtracts V: zero when the three agree. That is the only rule — write the difference, not the assignment — and it is what lets one program solve for V, for R, or for H.

Entering it. Names are typed on the ALPHA menu, which is the slow part:

PRGM GTO . .00 { 0-Byte Prgm } — a fresh program at the end PGM.FCN LBL ABCDE C WXYZ Y JKLM L ENTER01▸LBL "CYL" PGM.FCN MVAR RSTUV V ENTER02 MVAR "V"RCL RSTUV R ENTER05 RCL "R" — R does not exist yet; that is fine x2 π ×the arithmetic, one key each PRGMback to the stack

Running it. Press SOLVER. The menu lists every program that has MVARs — just CYL so far — and pressing it puts V R H on the top row. A number followed by a label stores it; a label alone solves for it:

SOLVER CYLSelect Solve Program, then V R H10 R 5 H VV=1,570.79632000 V RR=11.2838 — H is still 5; the radius for 2000 units20 R HH=1.5915 — and the height that gives 2000 at R = 20 Rx: 20.0000 — shift and a label recalls without solving

What the Solver is doing. It runs the program repeatedly with trial values in the unknown, watching the sign of the result. One evaluation, with R = 10, H = 5 and a trial V of 1,000, goes like this:

RCL "R"X = 10R as the menu stored it
X↑2 PI ×X = 314.1593πR²
RCL "H" ×X = 1,570.7963the volume the other two variables imply
RCL "V" −X = 570.7963minus the V being tried (1,000 here): not zero, try again

Reusing it. The same program is a complete VARMENU application: outside the Solver, XEQ "CYL" does nothing useful, but a one-line program VARMENU "CYL" followed by STOP puts the V R H menu up for plain data entry. Add MVARs to any formula and the 42S turns it into a form. Hand the same label to ∫f(x) and it will integrate it over whichever variable you pick.

Solver use is chapter 12 (p. 178), the rules for writing its programs p. 179, and TVM — a five-variable version of exactly this pattern — is the worked example on p. 192. Results are arithmetic checked in a decimal Free42; the display strings are as the manual shows them.