GOPHERSPACE.DE - P H O X Y
gophering on kagu-tsuchi.com
Title:  Programmer's Calculator
Date:  2019115
Tags:  retrocomputers
========================================

During one of the amazing restoration projects by CuriousMarc[0] and company
(though I forget which episode), he pulled out his vintage HP-16C programmer's
calculator.  He used it to quickly verify the bits coming out of a piece of
equipment they were testing.  I hadn't heard of this calculator before and I
thought it was a neat tool.

I looked around a bit to see what a "programmer's calculators" referred to out
there and it seems to pretty much mean just the HP-16C as no one else made
anything similar (someone correct me if I am wrong).  The programmer's
calculator is not a scientific calculator, nor a programmable calculator like
most people my age had to have in high school.  They were produced between 1982
and 1989 and it's functions were focused on calculations useful to computer
programmers of the time.

It is actually a programmable calculator but not via a programming language.  It
can save a macro by storing key presses.  It has 203 lines of code memory which
is shared with data storage.  A "line" is a loose term as some commands are
multiple key presses (there are 2 modifier keys so each key can do 3 functions)
and data can vary in word size.

The calculator supports most functions of a basic microcomputer assembly
language.  Bitwise operations, stores and loads to memory, subroutines, a call
stack, an index register, status flags, compares, etc.  It has 4 working
registers that operate as a stack.  That's because the calculator uses Reverse
Polish Notation.  

The calculator is actually quite a bit more powerful than a computer in that it
can be run with any word size between 1 and 64 bits.  It supported unsigned, 1's
and 2's compliment representations.  Can convert between decimal, hexadecimal,
octal, and decimal on the fly.  It also has a float mode and algebraic
functions.

I took a quick look around to see what it would take get one.  There are several
on eBay but they were in the $250+ range.  I thought that was a bit much, but in
reading about the HP I also found SwissMicros[1] which is reproducing (emulated)
vintage HP calculators and had a 16L that replicates the HP-16C for less money.
While being cheaper, it's also more efficient, runs faster (can be switched to
original speed), and has a USB console interface to dump or load programs and
control the calculator remotely.

I decided to order one and while waiting for it to ship across the world, read
the entire manual from HP[2].  It arrived the other day and it's a pretty neat
hand held "almost computer".  If we're comparing it to an Altair, say, it's
pretty advanced.  I programmed in the 16-bit XOR shift pseudo-random number
generator, one of the first programs I wrote for the Altair[3].

If you work with bits a lot and like to have a physical device over using
software, I recommend one.  Vintage HP if that's your style, or the modern
remake will work.  Old HP calculators seem to have quite a following so there is
a lot of information out there.


[0] https://www.youtube.com/user/mverdiell
[1] https://www.swissmicros.com/index.php
[2] http://www.hp41.net/forum/fileshp41net/hp16c.pdf
[3] gopher://kagu-tsuchi.com:70/0/blog/articles/8080_PRNG.txt