Files in directory dm32/EML from the latest check-in of branch trunk
- Makefile
- README.md
- Suite.d32
- Suite.hp32sii
EML/Suite for the HP-32S Family
EML/Suite port to the HP-32S, HP-32SII, and SwissMicros DM32. I do not have an HP 33s to try it on, but a quick skim of the manual suggests it should work as-is.
Rather than key in all this code on-device, I wrote the source code in the one true programmer’s text editor,1 then used rejig to produce the program file:
$ rejig Suite.hp32sii -o Suite.d32
Or, thanks to the provided Makefile, just say make.
The result may be loaded directly into a DM32, rather than hand transcribe it into one of its HP legacies.
This is partially compatible with the HP 35s, but because its complex number handling is so different, there is a separate port taking full advantage.
Usage
This suite’s subroutines had to be renamed from those in the reference implementation to fit within the single-letter naming scheme used on the 32S family. Rather than give rejig free rein in mapping names, I chose mnemonics:
| Label | Fn | Stk | Description, Mnemonic |
|---|---|---|---|
| A | `y+x` | 3 | Add |
| E | `eml(x,y)` | 0 | Exp-Minus-Log |
| I | `1÷x` | 2 | Invert (reciprocal) |
| L | `ln(x)` | 1 | Log, natural |
| M | `y×x` | 2 | Multiply |
| N | `-x` | 3 | Negate |
| O | `-1` | 3 | negative One |
| P | `pow(x,y)` | 2 | Power |
| Q | `x^2` | 3 | sQuare |
| S | `y-x` | 1 | Subtract |
| U | none | 4 | test stack Usage |
| W | `2` | 3 | tWo |
| X | `exp(x)` | 1 | eXponential |
| Y | `e` | 2 | Yooler’s number |
| Z | `0` | 2 | Zero |
Yes, at least one of those is horrifically cringy. Such is the nature of single-letter mnemonics, which is why no one does that today.
Oh, wait. 🤦♂️
Moving on…!
Subroutines taking arguments follow the traditional RPN order used by the builtin operations.
Beware that the addition and multiplication operations aren’t strictly commutative due to differences in the way the arguments are handled. Swapping their order will give slightly different results!
Resources
Operands are consumed and replaced with results in the same manner as the builtin equivalents. Prior elements on the stack may be overwritten by intermediate results, but no “litter” is left behind.
The only global register used in this version is X during multiplication, LBL M. Unlike the reference implementation, we don’t need more because the limitations below cut off the more complicated functions.
Limitations
For EML’s raw number-crunching purposes, the 32S family isn’t much better than the HP-12C, as may be seen by comparing that port to this one. The main improvement is a nicer presentation due to use of LBL/XEQ over GTO, which in turn avoids the need for unrolling the primitives.
Classic HP Stack
The 4-level stack necessitates more careful management of intermediate values than the default 8-level stack of the R47. That’s even before we get into…
Complex Numbers
The halfhearted complex number support in the 32S family limits this EML port to scarcely more than we got in the HP-12C family port. I could reimplement it in terms of calculator CMPLX* builtins, but that would touch everything clear down to `eml(x,y)`, at which point it would no longer be “EML.” Atop that, this botch effectively reduces the 32S family to a 2-level stack in routines that must operate in the complex domain.
Because I chose not to take those hits, multiplication, `x^2`, and `y^x` are limited to positive arguments in this port.
This and more are vastly improved in the HP 35s port.
License
These programs are © 2026 by Warren Young and offered under the terms of the MIT License.
- ^
In this specific case Cursor with the Neovim plugin, but
vigenerically, being the proper baseline for writing software. I have spoken.