The clamshell that started RPL: fold it open and there is an alphabet on the left, a calculator on the right, and between them a language in which numbers, formulas, programs and matrices are all just objects on one unlimited stack. This sheet draws both keyboards, explains the ideas the 28C introduced — objects and delimiters, the command line, menus on the alpha keys, local variables, algebraics you can differentiate and solve — and then indexes every command by menu, with its type and Reference Manual page. The red ■ is the one shift key.
Sources: HP-28C Getting Started Manual, Ed. 3 (HP, March 1987) — keyboards, entry modes, Menu Map, Key Index; HP-28C Reference Manual (HP, 1987) — the Dictionary and the Operation Index the command list is parsed from; HP-28C Programming Examples (HP, June 1987) — the worked example. Page numbers are Reference Manual pages. 1.23456E-25Complex number( )(123.45,678.90)String" ""RESULT"Real vector / matrix[ ][1.23 4.56 7.89]Complex vector / matrix[ ][(1,2) (3,4)]List{ }{1.23 "ABC" #45}Name' ''CALC'Program« »« DUP + SWAP »Algebraic' ''X+Z·Y=Z'Binary integer##123ABα (alpha mode); LC for lower caseRPL has no separate worlds for numbers, text, programs and formulas. The stack holds objects, and there are exactly ten kinds — the label printed inside the lid lists them, and TYPE returns the number. What tells the calculator which kind you are typing is the delimiter you open with.
1.23456E-25( )(123.45,678.90)" ""RESULT"[ ][1.23 4.56 7.89][ ][(1,2) (3,4)]{ }{1.23 "ABC" #45}' ''CALC'→ name→ n « … »« »« DUP + SWAP »' ''X+Z·Y=Z'##123ABThe two that matter most are the quotes. 'X+1' is an algebraic — a formula kept as a formula, which is what the ALGEBRA menu, the solver and d/dx operate on. « DUP + » is a program — a sequence of objects and commands waiting to run. Both are data until you EVAL them, and a name in quotes is the name itself, while the same name unquoted evaluates whatever is stored under it.
You type into a command line at the bottom of the display; nothing reaches the stack until ENTER parses it. That is why ENTER is one key and why pressing an operator with something still in the command line does two things at once.
The stack is unlimited (until memory runs out), so there is no T register to lose things off the top and no LAST X — instead ■ LAST returns the arguments of the last command, and ■ UNDO the whole previous stack. The display shows four levels; ■ VIEW▲ scrolls to the rest.
One line, 23 characters: key more and it scrolls. The cursor keys along the top of the right keyboard edit it, and ■ COMMAND brings back the last four lines you entered.
The 28C has 2048 bytes of user memory, of which about 400 are reserved for the system — so roughly 1,650 bytes for everything you store. The 28S, a year later, has 32 KB and is otherwise the same machine.
The Reference Manual is blunt about it: the machine is for interactive problem solving, not for storing libraries. Even parsing the command line takes memory, and COLCT, EXPAN and TAYLR eat it fast on a long expression. Keep a few hundred bytes free — ■ MEM tells you — or you will meet Low Memory mid-calculation.
A memory reset is ON + INS, then DEL, release INS then ON; the display says Memory Lost. Reference Manual p. 21 (Low Memory), Getting Started p. 18.
The HP-28C of 1987 is the first RPL calculator and the ancestor of the 48 and 50g. It is a clamshell: the case folds open to two keyboards, a full alphabet on the left and the numeric keys on the right, under a four-line display. Inside is a Saturn CPU, the same family as the 48.
The RPL here is the language itself, minus what the 48 added later: no directories, no units as objects, no graphics objects, no libraries or cards. The ideas — objects, the unlimited stack, « », local variables, algebraics — are all present.
The right half is a calculator. The left half is a keyboard, and its red shifted labels are the way into everything else.
The red square on the right keyboard is the single shift key; there is no second colour. The delimiters — « », ' ', [ ], { }, " ", # — have keys of their own on the bottom rows of the left half.
What the command line does with your keystrokes depends on a mode the cursor shows you.
In algebraic entry you can key 'X^2+3*X' and have it stay a formula; in immediate entry the same keys would try to compute it. Most confusion on the 28C is one of these three modes being on when you expected another.
Unlimited depth, numbered from level 1 at the bottom. Everything you would expect from RPN, plus the tools an object stack needs.
There is no LAST X; there is LAST, which recovers however many arguments the command took. Enable it in the MODE menu — it costs memory.
Storage is by name. 'R' STO stores level 2 under R; typing R unquoted evaluates it, which for a number just recalls it and for a program runs it.
A variable holding a program is a command. That is the whole extension mechanism: write a program, store it, and it sits in USER next to the built-ins.
An expression in quotes is data. You can store it, put it on the stack, differentiate it, solve it, plot it — and only when you EVAL or →NUM it does it become a number.
Names inside an expression that have values stored are substituted on EVAL; names without values stay symbolic. That is how one formula serves as both a function and an equation.
Store an equation, and the SOLVE menu turns its variables into keys. Give each a value and press the one you want found.
It is an iterative root-finder, so a guess matters when there is more than one root, and it reports how it finished — Zero, Sign Reversal, or Extremum — because a converged answer is not always a root.
A program is a list of objects between « and ». Run it and each object is evaluated in turn: numbers push, commands execute, names recall or call.
Local variables are the idiom that separates 28C code from calculator-style stack juggling. → h w l pulls three values off the stack and the following program can use them by name — and a function written that way works in RPN and inside algebraics alike.
Structured control flow, in the BRANCH menu. Tests leave a flag on the stack; the structures consume it.
Comparisons — <, ≤, ==, ≠, SAME — are in the TEST menu, with AND OR XOR NOT. == compares; = builds an equation.
Vectors and matrices are single objects and take the arithmetic keys directly.
Data points go into a matrix named ΣDAT; the STAT menu works on it. Plots go to the LCD, 137 pixels wide.
Number formats, angle mode and the radix are in the MODE menu, along with the two that surprise people.
Errors show as a message on the top line and stop the program; ERRN and ERRM recover the number and text, and IFERR traps them.
ATTN (the ON key) aborts anything. KILL clears every suspended program if HALT has left several waiting.
Two manuals, and the second is the one to keep open.
Everything on this sheet is drawn from those; the 28S manuals describe the same language with more room.
«begin the program→ ntake n from the stack into a local variable«the defining program, where n is visibleIF n 1 ≤is n ≤ 1? — the test leaves a flag on the stackTHEN nF₀ = 0 and F₁ = 1, so the answer is n itselfELSE0 1seed the stack with F₀ and F₁2 n STARTrepeat, once for each of F₂ … FₙDUPcopy the newest FROTbring the previous F back to level 1+and add: the next FNEXTend of the loop bodySWAP DROPdiscard Fₙ₋₁, leaving FₙENDend of the conditional»end of the defining program»end of the program'FIB2' STOput it on the stack and store it as FIB2FIB2 as listed in HP's Programming Examples booklet, p. 17. Typed in alpha mode, or built from the menus; the structure words are on the BRANCH menu.
Fₙ, the n-th Fibonacci number, is the classic first program because it needs a conditional, a loop and some stack discipline — and on the 28C those are three ideas the machine introduced to calculators. The booklet gives two versions; this is the loop one, which it notes is the fast one.
Line 2 is the important line. → n takes the top of the stack into a local variable called n, visible inside the program that follows. Everything after it can say n instead of shuffling the stack to reach the argument — which is what makes RPL programs readable where keystroke programs were not. Locals vanish when the program ends.
The test. n 1 ≤ leaves a flag; IF … THEN … ELSE … END consumes it. F₀ = 0 and F₁ = 1, so for n ≤ 1 the answer is n and the program just leaves it there.
The loop. 0 1 seeds the stack with F₀ and F₁. 2 n START repeats the body n − 1 times, no counter needed, and the body is three stack words:
Each pass leaves the two newest numbers in levels 2 and 1, so the loop invariant is visible in the stack. SWAP DROP at the end discards Fₙ₋₁ and leaves Fₙ.
The recursive version in the same booklet, FIB1, is a one-line user function — → n 'IFTE(n≤1, n, FIB1(n−1)+FIB1(n−2))' — and takes exponentially longer, which the booklet uses to explain why.