The Math ROM is a powerful extension of the HP-71B. It provides many additional functions and statements that greatly enhance the HP-71B math capabilities:
-
complex variable type and comprehensive function set,
- array and matrix functions,
- numerical function root solver,
- numerical integration,
- fast Fourier transform,
- roots of a polynomial,
- hyperbolic functions,
- utilities: base conversion, log base 2, gamma function.
The Math ROM for the HP-71B was introduced in 1984 and is the descendant of a long line of Math ROMs for various machines. After the HP-71B, the new series of high-end scientific "RPL" calculators starting with the HP-28C/S, then with the 48/49/50 series tend to include all the mathematic functionalities built-in, even if third-party extensions existed to cover special needs. So the HP-71B Math ROM can be viewed as the last member of a great family.
We can attempt to trace the origins of the HP-71B Math ROM functionalities:
The matrix function set comes from the computer side and is the oldest feature set that can be traced, down to the HP 2000 BASIC (1969) for the 2000 Timeshare System. As for desktop computers, the functions appeared in the 9830 (1972), 9825 (1976) and 9831 (1977) Matrix ROMs, were then provided as standard in the 9835 and 9845 BASIC (1977-78). They were available again as optional plug-in ROMs on the series 80 (HP83/85 and HP86/87 Matrix ROMs, 1980-82) and in the HP-75C Math ROM (1983), and included in the series 200/300 BASIC (the "MAT BIN" since BASIC 3.0, 1984).
The solve and integrate
features clearly come from the handheld calculator side with the HP-34C (1979), they have been then
included in the classic HP-15C
(1982) and later re-used in the HP-41C Advantage ROM (1985).
The solver origin may be traced down to the financial calculators starting with
the HP-80 (1973) that needed to
solve the financial equations numerically, however this solver was dedicated to
a set of equations and not available for general purpose to the user.
The complex number
functionalities were introduced in the HP-15C (1982) in a properly integrated
working environment. Other machines, like the HP-41C Math or Advantage ROMs
were able to manage calculations on complex numbers but in a limited and
primitive way.
The HP-75C Math ROM
(1983) provided a support for complex variables and calculations in the form of
dedicated, assembly-code keywords, that was much better than previous
implementations (15C excepted) but was still a bit tedious to use.
The complex number support appeared on HP desktop computers properly integrated
to the language only with the BASIC 5.0 (1987) on
series 200/300 (the "COMPLEX BIN") with an implementation similar to
the HP-71B Math ROM, the main difference is the use of the CMPLX(x,y) function
to create a complex value in lieu of the HP-71B (x,y) tuple.
The polynomial root finder has been provided on many previous computers and calculators, it is difficult to clearly identify the origin. However, the HP-75C and HP-71B Math ROM implementations in assembly code are much more efficient.
The finite/fast Fourier transform has been available on several previous machines, often as a user language program as in the HP-41C Math ROM, but the HP-71B version (derived from the HP-75C) is an efficient assembly-code implementation.
The direct predecessor of the HP-71B Math ROM is the HP-75C equivalent ROM. Both modules have similar functionalities (they have been managed by the same project leader, see L. Grodd bio here), the HP-71B version is more powerful in several aspects but lacks some of the HP-75C features, unfortunately.
On Math ROM predecessors:
Other technical literature:
The goal of this project is to document the Math ROM (we don't have the original source files, nor anything like a Math ROM IDS document) and possibly modify and extend the original version.
The project was in my
mind since a long time, I already did a similar task with the re-construction
of the JPC ROM sources for which I had access to most
individual LEX source files (very often outdated), and a disassembly done by
Rodger Rosenbaum as starting points.
Nothing similar exists for the Math ROM. There were several attempts to
partially disassemble the Math ROM to extracted a few functions and build
stand-alone LEX files, for instance the TYPE LEX
from PPC-Paris or my own BCONV LEX. Other
attempts to produce a complete disassembly file may have been done in the past,
but I have no trace on them.
My goal was to get something that could be properly called 'source files', with enough comments to understand the program structures and the logic behind the binary code. I believed it was possible because the HP-71B system is very well documented with the IDS documents. Also the Math ROM, like other ROM or LEX for the HP-71B, heavily relies on the HP-71B internal routines (the so-called supported entry points).
The key event was finally convicted me that it was feasible is the recent availability of the HP-75C Math ROM source files. As recognized earlier, both modules have very close functionalities. There are some differences in the implementation especially in the complex number support and the two machines are based on very different CPU architecture (Saturn vs Capricorn), but the underlying algorithms are the same (or very similar) so it is possible to use the HP-75C Math ROM sources as a guide.
To recreate the Math ROM source files, I manually disassembled the whole 28K of the HP-71B Math Lex, sorted out the embedded data or special programming structures, identified the Math ROM keyword entry points and split the code into functional sections in separated files. I finally successfully assembled the exact Math ROM version 1A on Dec. 2019.
The present preliminary
release (Dec. 2019) already documents several parts, mainly the scalar (real
and complex) functions, actually well enough to start enhancing the ROM (see
below) !
However, this is only the start. I'm aware that other parts of the ROM (the
matrix functions or the solver, for instance) will be much more difficult to
document.
This is a big project, and it will keep me busy for several months.
Objectives:
The objectives of the "Math Pac 2" are:
- add missing keywords or features, mainly compared to the HP-75C Math ROM,
- improve the compatibility with the HP-75C, Series 80 and Series 200/300 BASIC,
- possibly improve some math functionalities from the HP-28C/S and/or HP-42S of the time (87-88),
- NOT to add anachronistic features for instance from the HP50G and Prime of the XXI century,
- use the full 32 KB available space (but not beyond, to fit in a 32K port),
- and remain 100% backward compatible with the Math ROM 1A.
Version 2B - maintenance release 2B7, Feb. 2021:
This version adds these functional enhancements on top of the version 2A features:
- addition of the AMAX/AMIN/MAXAB/MINAB and SUM/ABSUM array functions,
- implementation of the ACOL/AROW functions,
- addition of the MAT..CROSS, MAT..CSUM and MAT..RSUM statements,
- addition of the MAT..INV()* and MAT..LUFACT statements,
- alignment of some parts of the Math Pac algorithms with the HP-28S/42S,
- implementation of the MAT..INV()* statement in line with 28S/42S matrix division,
- addition of the INTEG, FROOT, IX, FX shortcuts for INTEGRAL, FNROOT, IVAR, FVAR,
- complex matrix determinant functions DET/CDET,
- addition of DOT2 alternate dot product function.
See the manual supplement for details.
Version 2A - Feb.2020:
This version provides these functional enhancements:
- support of complex arguments with the inverse trigonometric ASIN/ACOS/ATAN, inverse hyperbolic ASINH/ACOSH/ATANH and decimal log LGT functions, these operations were missing in the Math 1A ROM,
- enhancement of the complex square operation z^2, now internally computed as z*z to provide the same functionality and accuracy on complex numbers than the x^2 key on other calculators (15C, 28C/S, 42S),
- addition of the cotangent, secant and cosecant functions (COT, SEC and CSC) for HP-75C and Series 80 compatibility.
Please contact me if you have any suggestions, bug fixes
or enhancements to propose!
If you
want to modify and re-assemble the Math LEX, you may need the following tools:
(these are 16-bit DOS applications, use DOSBox on 64-bit systems)
You can also refer to this updated Entry Point List:
If you have more information on the Math ROM history, or if you have bug reports or suggestions for improvement, please contact me:
J-F Garnier, 2021