The calculator that could talk. A fourteen-character alphanumeric display, an Alpha register that holds text, named files in extended memory, a clock that runs with the machine off and can wake it to run a program — all reached from 35 keys wearing three legends each. This sheet is a working guide to the machine and then an index of every function, with the gold prefix written as ■ the way the keyboard leaves it: unlabelled. Hover any entry for the full description and its manual page.
Sources: HP-41CX Owner's Manual volumes 1 and 2 (HP, 1983) and the HP-41CX Quick Reference Guide; page numbers are volume 2, whose Function Tables (pp. 414–439) give this index its grouping. Function names are read from the ROM images, not the scans — see the foot of this page.Every key does up to three jobs, and which one you get depends on a toggle, not on holding anything down. That is the whole trick of the 41: the machine has more functions than keys and reaches them by modes.
ON, USER, PRGM and ALPHA are not part of that scheme. They are four flat unitask keys on the case above the keyboard, each with exactly one job, and they are pressed directly — never after the prefix. They also work in Program mode without leaving it, which is what makes them toggles rather than functions. The one exception is ■ then ON, which selects continuous on.
Hold any key down and the display previews the function without executing it; slide off the key before releasing and nothing happens. It is the safest way to find out what a key does.
The gold prefix key carries no legend at all — it is the blank gold key in the third row.
There is no expression to edit and no parentheses to balance. Four registers — T, Z, Y, X — hold the working numbers, X is what the display shows, and every function takes its arguments from the bottom of that pile and drops the answer back into it. A fifth register, LAST X, quietly keeps whatever X held before the last operation.
The subtlety that bites everyone is that ENTER↑ disables stack lift. It is one of only four operations that do — ENTER↑, CLX, Σ+ and Σ-. After any of them the next number you key writes over X instead of pushing it up.
Unlike the Voyagers there is no R↑ on the keyboard face: it is gold-shifted, and the stack is otherwise identical.
Every storage register on the 41 — a stack level, Rnn, an extended memory register — is the same seven bytes, fourteen nibbles wide. A number uses them as sign, ten mantissa digits and a signed two-digit exponent. The same fourteen nibbles hold six characters of text instead, which is why ASTO stores six and no more.
Numbers are decimal, not binary: ten digits, not ten bits of precision. Nothing is lost to binary rounding, and 0.1 is exactly a tenth.
Main memory is a single block shared between numbered data registers and program bytes, and SIZE is the boundary between them. Raising SIZE takes the bytes from your programs; lowering it destroys the registers above the new line. Extended memory is a separate pool and is not touched by SIZE at all.
The practical rule: set SIZE once, at the start, big enough for the registers the program names. NONEXISTENT almost always means SIZE is smaller than the register you asked for.
ISG and DSE read a single register as three packed fields — a counter, a limit and a step — so a whole for loop lives in one register and one program line. The number is written iiiii.fffcc.
ISG adds the step and skips the next line once the counter passes the limit; DSE subtracts and skips once it falls below. The skipped line is normally the GTO that closes the loop — so the loop ends by skipping its own branch.
1.010 counts 1 to 10 by ones. Only the first five digits are the counter, so the largest loop is 99999 passes.
Twenty-four characters, kept entirely apart from the stack. It is the machine’s string type: prompts and messages, file names, global labels, and raw bytes for anything the designers did not think of. The display shows twelve characters at a time.
Keying into Alpha replaces what is there; APPEND (the ├ that opens a text line in a listing) adds to the end instead. ATOX and XTOA move one byte at a time between Alpha and X, which is how a program does character work at all.
The HP-41CX of 1983 is the last and largest of the 41 line: a programmable RPN calculator with a fourteen-character alphanumeric display at a time when its rivals showed seven segments and nothing else. That display is the whole point. A 41 program can ask a question in words, name its own variables, and print a legible answer, so a machine that computes becomes a machine that can be handed to someone else.
The CX folds in what used to be plug-ins: the Time module and the Extended Functions are built in, and it carries 124 registers of extended memory and a text editor. Four ports remain for everything else.
Continuous Memory means off is only a display state. Programs, registers, alarms and the clock survive it, and survive battery changes if you are quick.
There are more functions than keys, and the way out is modes rather than more prefixes. The plain legend is on the key; the gold legend is on the case above it, reached with the unlabelled gold prefix; ALPHA turns the keyboard into a typewriter; USER swaps in your own assignments.
Any function can be run by name with XEQ, so nothing is unreachable. Assigning the ones you use to keys with ASN is what makes the machine yours.
Holding a key previews the function in the display without running it. Slide off the key before letting go to cancel.
Numbers and letters are keyed the same way. The first keystroke shows the character and an input cue _; while the cue is showing, ← deletes one character. Once entry is terminated the cue disappears and ← means clear instead — the same key, two very different jobs.
123_ENTER↑123.0000 — entry ends, X copied to Y4 545_ — writes over X, no lift←4_ — cue showing, so backspace←0.0000 — cue gone, so clearEEX starts an exponent and CHS signs whichever part you are in — the mantissa, or the exponent if you have pressed EEX.
Fourteen characters, and a row of annunciators along the top that is worth learning to read: they are the machine telling you what mode it is in.
FIX, SCI and ENG change only what you see; all ten digits stay inside. RND is the one function that makes the stored number match the shown one.
The 0–4 annunciator counts pending subroutine returns. If it is lit when you think a program has finished, something never came back.
Four registers, X at the bottom and visible. Two-number functions take Y and X and drop the stack; one-number functions replace X. LAST X holds the previous X, which makes a mistyped operand recoverable and lets a value be used twice without storing it.
5.0000■ LAST X3.0000 — the operand, still thereR↓roll the whole stack downX<>Yswap the bottom twoOnly ENTER↑, CLX, Σ+ and Σ- disable stack lift. After any of them the next number overwrites X instead of pushing it up — which is exactly what you want after ENTER↑, and a trap everywhere else.
Data registers are numbered, not named, and how many exist is up to you. SIZE divides main memory between registers and program bytes; the split is the single most common source of confusion on the machine.
Register arithmetic leaves the answer in the register. STO + 07 is not RCL 07 then +; it is the accumulator idiom, and it does not disturb the stack.
Indirect addressing — the IND that appears after a function name — takes the register number from another register, which is how a loop walks a table.
Fifty-six one-bit switches. Flags 00–29 are yours; 30–55 are the machine reporting on itself. The tests skip the next line unless the condition holds — “do if true”.
The two that change how the machine behaves rather than reporting on it are 21 (whether VIEW and AVIEW stop a program) and 25 (swallow the next error). Flag 25 is the 41’s entire error-handling story: try the thing, then ask whether it worked.
A program is a list of the keystrokes you would have pressed. Enter PRGM, key them, leave. Labels are the entry points: local numeric labels 00–14 are one byte and private to the program; a global Alpha label is what the outside world sees.
GTO . . is the incantation worth memorising: it packs memory and opens a fresh program at the bottom, which is how you start typing one in without disturbing what is already there.
Six levels of subroutine return. The 0–4 annunciator shows how many are pending.
Every conditional skips one line if the test fails, so the line after a test is the “true” branch — almost always a GTO.
Counted loops live in one register as iiiii.fffcc — counter, limit, step. ISG counts up and DSE counts down, and each skips the next line when the loop is done, so the loop ends by skipping its own branch.
This is what the 41 has that its contemporaries do not. A program can ask, in words, and read back a typed answer.
PROMPT always stops; AVIEW stops only if flag 21 is set and flag 55 clear — that is, when there is no printer to send it to instead. GETKEYX waits a chosen number of seconds for a single keypress, which is enough to build a menu.
A second pool of memory, holding named files rather than numbered registers, and untouched by SIZE. Three kinds: program, data, and text. One file at a time is current, with a pointer that remembers where you were in it.
Nothing is allocated for you: you create a file, you size it, you purge it. EMDIR lists what is there and EMROOM says how much is left.
Flag 17 is set when a read runs off the end — the flag to test at the top of a record loop.
The clock runs with the machine off and survives MEMORY LOST. Dates are numbers in the current MDY or DMY format, and there is real date arithmetic.
9.091986 — today, as a number30 DATE+thirty days onDDAYSdays between two datesDOW0 = Sunday … 6 = SaturdayAn alarm set with XYZALM takes a time, a date, a repeat interval and a message — and if the message is a global label it becomes a control alarm that runs that program. A calculator that wakes itself up to do something is not a common thing even now.
Six listings, all under one key, and the fastest way to find out what a particular machine actually contains.
R/S pauses a running catalog and ← stops it. Stopping CATALOG 4 on a file makes that file current, which is the quickest way to select one by hand.
Errors stop the program and put a word in the display. The useful habit is to read it as a statement about which assumption failed.
Set flag 25 before an operation that may fail and the error is swallowed and the flag cleared instead; FS?C 25 afterwards tells you what happened. It is the only error handling the machine has, and it is enough.
Against a 41C or CV, the CX is the same machine with the accessories built in and a handful of genuinely new functions (OM2 appendix I).
Programs written for a C or CV run unchanged; the reverse is only true if you stay off the CX-only functions.
The two-volume Owner’s Manual is unusually good, and volume 2 is the one to keep: its ten Function Tables (pp. 414–439) are the index this sheet is built around, and its appendix A lists every error.
The names here were read out of the ROM rather than the page, because the scans print every key legend in a symbol font that OCR turns into noise. The Extended Functions and Time modules carry a proper function table in ROM; the built-ins are found by their names, which sit in the words just below each entry point.
The emulator these were read from is QtNewT by J.W. Sievers, a NUT processor implementation with a Qt front end.
Only flags 00–29 can be set and cleared by SF and CF; the rest are read-only status. RCLFLAG and STOFLAG save and restore 00–43 in one number, which is how a subroutine leaves its caller’s flags as it found them.
01 LBL⊦DUEa global label, so XEQ and CATALOG 1 can see it02 ⊦TARGET? a text line — keying one replaces whatever Alpha held03 PROMPTshow it and stop, waiting for a date and R/S04 DATEtoday's date, pushed into X — the target moves up to Y05 X<>YDDAYS wants the earlier date in Y06 DDAYSdays between the two dates07 STO 00keep the answer08 ⊦DAYS a second text line, so the prompt is written over09 ARCL 00append the number, formatted as the display shows it10 AVIEWshow the finished line11 ENDEach box is the display as you would see it, one program line at a time. There are no quotation marks on this machine: an Alpha string is introduced by a raised T and closed by nothing, so a printed listing’s LBL "DUE" reads LBL⊦DUE here (OM1 p. 93). A text line replaces the Alpha register; to add to it instead, begin the string with the append character (OM2 p. 159).
This is a small program, but it is a fair portrait of what the 41 is for. It asks a question in words, does arithmetic no other calculator of its generation could do, and gives the answer back as a sentence. Three of its eleven lines — DATE, DDAYS and ARCL — would not exist on a machine with a seven-segment display.
Entering it. The awkward part of the 41 is that text is typed on the Alpha keyboard while the rest is not, so a listing like this means toggling in and out of ALPHA:
00 REG nnn — PRGM lights; nnn is how many registers are free■ GTO . .00 REG nnn — packed, and positioned at the end■ LBL ALPHA D U E ALPHA01 LBL⊦DUEALPHA T A R G E T ? ALPHA02 ⊦TARGET? XEQ ALPHA P R O M P T ALPHA03 PROMPTPRGM0.0000 — back to Execution modeThat second column is the machine talking back: in Program mode the display is the listing, one line at a time. Notice what it does with the quotation marks — it has none. The 41 introduces an Alpha string with a raised T instead, and closes it with nothing, so what a printed listing writes as LBL "DUE" reads 01 LBL⊦DUE on the machine.
The one subtlety. DDAYS returns a positive number when the date in Y is the earlier of the two. After PROMPT the target is sitting in X; DATE then lifts the stack, pushing the target up to Y and putting today in X — which is the wrong way round, and why line 05 exists.
after PROMPTX = targetwhatever was keyed in and entered with R/SDATEX = today, Y = targetDATE lifts the stack, so the target moves upX<>YX = target, Y = todayDDAYS counts from Y to XDDAYSX = dayspositive when the date in Y is the earlier oneRunning it. Dates are plain numbers in the current MDY or DMY format, so 25 December 1986 is 12.251986 with MDY selected:
TARGET?12.251986 R/SDAYS 107.0000Making it yours. Assign it to a key with ASN and it becomes part of the keyboard; give it to XYZALM as an alarm message and the calculator will run it by itself, at a time and date you choose, with the machine switched off. That last step is the one that still has no real equivalent on a pocket calculator.
Program entry is OM2 section 18 (p. 280), the date functions section 15 (p. 236), and ARCL formatting section 12 (p. 200). DDAYS counts actual days, so leap years are handled; the clock is valid from 1900 to 2199 (appendix F, p. 374).