These are a few of my choicest ones for assorted HP handhelds (no SHARPs on sight):
HP-25:
WHAT: Numerical solution of 1st-order Differential
Equations using a 3rd-order Runge-Kutta method
WHY: Because at the time, it seemed next to impossible
to fit such a program on the meager HP-25's 49 steps,
having to call your f(x) three times with different
arguments and returning to different locations
in a machine without GOSUB capability, while still
leaving enough free steps to define your f(x).
My approach was clever enough that it inspired my
close friend Fernando del Rey to try and improve it
to a 4th-order RK method, which succeeded in
calling f(x) *four* times, and still left 10 steps
or so for your f(x). To this day I still consider
it the most amazing program I've ever seen.
HP-67:
WHAT: Elliptical Filter Design
WHY: Elliptical Filters were superior to any other
standard filters in that they can be of lower degree
for a given specs, as they do have true minimax
properties. Designing them requires elliptic
trigonometric functions (instead of the usual
circular ones) and computing them with the required
accuracy and fast enough was a real challenge in the
slow HP-67's 224 steps. I had to design quite clever
algorithms to accomplish it all, but in the end
my program would compute high-pass, low-pass,
band-pass and band-stop elliptic filters, would
compute the zeros and poles and would plot the
graphics and all other data relevant to the design.
HP-41C:
WHAT: 8x8 Othello (aka Reversi) game, the user playing
against the HP-41C, which played a reasonably
challenging game at a reasonably fast speed, while
graphically printing the board, checking your moves
for legality, being able to play against itself,
and finally announcing the winner.
WHY: Because at the time noone had attempted to program
such a complicated board game on a 41C. It required
several Memory Modules (no Quad Module or 41CV then)
and extremely impressed everyone who saw it, so much
so that local HP used it to increase sales at local
trade shows, as a demo, and it finally got to the
hands of HP Corvallis, who where equally impressed.
They wrote me a letter telling me so, and asking
for my written permission to use and publish it
as they saw fit, which I obligued. They then wrote
a second 'thankyou' letter including a printed
'Outstanding Achievement' Diploma, redeemable for
some expensive 41C peripherals. I still keep it.
'Othello' was also a sensation when I submitted
it for publication in the legendary Australian
PPC Technical Notes, where it appeared. Oddly, it
had been previously submitted to PPC proper, but
Richard Nelson gave it a miss.
HP-12C:
WHAT: Trigonometric functions package
WHY: Because noone else had written an acceptable
package which implemented all six trigonometric
functions for the HP-12C under serious, strict
requirements of accuracy and speed. Some people had
tried before and after, but hastily and carelessly
implementing a bunch of run-of-the-mill Taylor
Series expansions doesn't quite cut it and is bound
to offer poor accuracy and unacceptable running times
or even outright errors for large arguments or
arguments near extremes, i.e.: it's not the same
computing arc tan(100000000) than arc tan(1), and
it's not the same computing arc sin(0.99999) than
arc sin(0.1). My program succeeds in delivering
accurate results for extended ranges at the fastest
speeds and it does so for all six functions in a
single 99-step program.
WHAT: Polynomial root finder and evaluator
WHY: Because this very small, 37 step program, succeded
in using the financial functions available in the
HP-12C well above and beyond their intended uses
to provide the best and fastest polynomial root
finder and evaluator among all Voyager series
models (HP-15C included) and even faster than any
pure RPN programs for the HP-41C. It could find
any and all real roots of an Nth-degree polynomial,
without any iterations in user code, and it could
directly evaluate the polynomial for some given
arguments, also without using any user code loops.
HP-15C:
WHAT: Computing E up to 208 digits
WHY: I haven't written that many programs for the HP-15C
but this I consider particularly worthy. While it
is possible to compute E to more than 400 digits
on the 15C, my program was intended to do it using
matrix functions and matrix techniques, as a way
of demonstrating what they could do. So, it made
a good use of matrix addition to update the running
total, and a novel use of the matrix Frobenius Norm
operation to detect termination, as well as scalar
matrix division to normalize the final result. You
don't see matrix operations being used like this
that often.
HP-71B:
WHAT: Chess - Solving mate problems in N moves
WHY: Because it actually solved any chess problem of the
'White to play and mate in N moves' kind, in pure
BASIC with no help from assembly language routines,
using the powerful technique of *recursive* user
defined functions that HP-71B's ultra-advanced BASIC
language allows. There's also a neat trick on my part,
defining and using variables *local* to the functions,
which is something apparently not possible. The
resulting program is quite complex, implements a
full legal-move generator and recursive move-tree
generator and evaluator and works for any number
of moves N, subject only to time and memory constraints.
WHAT: Scramble
WHY: Because it implements a really challenging and
enjoyable *video* game on the smallish HP-71B display.
It uses a number of commands contained in my 4 Kb
compilation of LEX words and succeeds in creating
a very entertaining game in just a dozen lines of
BASIC, with several levels of difficulty and an
assortment of tunnels and obstacles that the user
can add to easily, for extra-fun.