Program calculator HP-16C like a programmer's guardian deity

By : ilikephone / On : 01/12/2022

 I still keep a calculator on my desk and do little calculations, but the one that I still love was released by Hewlett-Packard in 1982. It's the HP-16C. It was released in Japan by Yokogawa-Hewlett-Packard, so it might be quicker for you to read the advertisement at the time rather than writing it here.

 As soon as I rummaged around the bookshelf, it came out. There is a monochrome advertisement in the November 1985 issue of "Monthly ASCII". Hexadecimal, Decimal, Octal, and Binary base conversion, bit operations, and programming up to 203 steps are possible. It was for hardware engineers and assembler programmers.

If you look closely at the advertisement, at the bottom there are department stores such as Mitsukoshi, Hankyu Department Store, Tokyu Toyoko Store, Seibu Department Store (Ikebukuro), Odakyu Department Store, Yokohama Takashimaya, Daimaru... I remembered that calculators and other items were often sold at department stores (early game consoles were also sold, although the sales floor was different). In particular, Mitsukoshi has been selling Hewlett-Packard calculators since Maruzen and Kinokuniya ad hoc stores were limited.

 A calculator for programmers was one of the things I always wanted, as I often used assembler in my work. Sometime around 1980, a colleague brought a calculator for programmers called the TI Programmer from Texas Instruments. I envy the convenience of debugging, such as converting hexadecimal counter values ​​in core dumps (search for those who don't know) to decimal, and simulating the results of bit operations. However, the TI Programmer was not something that young people could afford to buy (although I forgot how many tens of thousands of yen it cost).

 However, at the time, it was plausibly said that the number of man-hours required for computer development did not depend on the tools used for programming and debugging. No matter how you look at it, this is due to the debugging environment at the time. It must be true that the work done with a pencil and an eraser on a notebook was effective.

 The "HP-16C" appeared after a while from that time. The advertisement also says "Developed by computer engineers for computer engineers", which is exactly what it is. It's not an exaggeration to say that it supports almost all computers of any architecture (word length 1-64 bits, complement, carry, etc.). It fits in the breast pocket of a shirt and is always useful not only on the train but also in the bathroom.

 In other words, the HP-16C was a device like the guardian deity of programmers that saved all the engineers and programmers who used computers in the world.

HP-16C and Swiss Micros HP-16C compatible calculator DM-16. This company's line-up of HP-compatible calculators is steadily increasing.

 Many people have talked about the content of this computer-loving product, but a representative example is the "HP-16C programming technique" by Dr. Eiichi Wada, Japan's first hacker, who is also known as HHKB. There is a sentence. As the title suggests, it is about the HP-16C as a programmable calculator. Professor Wada describes the HP-16C as a "famous instrument" and says, "I still carry it with me every day."

 By the way, the Hewlett-Packard calculator, like the HP-16C, is characterized by its use of Reverse Polish Notation (RPN). With a general calculator, when you do a calculation like (6+7)×(9-3)=, you have to write it down in memory or on paper (of course, humans can remember it, but it's a mistake. under). On the other hand, in RPN, 6 [ENTER] 7 + 9 [ENTER] 3- × can be calculated smoothly and smoothly.

; To see how well this works, I recommend trying out the HP-16C web-based emulator. For detailed usage, please see the HP-16C Japanese manual on the HP site.

http://h10032.www1.hp.com/ctg/Manual/c01094895.pdf

https://stendec.io/ctb/hp16c.html

 Programming on the HP-16C is like writing keyboard operations as they are, but there are labels and conditional branching, so you can do quite a lot. In addition to having 32 registers that can be used as variables (more registers can be used via indexes, so it can be used like an array = see the manual for details).

Wada-sensei introduces prime factorization and Julian date calculations. So, while I was writing this manuscript, I also wanted to write a program with the HP-16C for the first time in a while. Below is a video of the program in action.

 This is a calculation that appears in Lewis Carroll's book, where the number that appears each time "142857" is added is a rotated value. Please look at the cuteness that "running" is displayed during calculation. For reference, here is what the code looks like (executed with "GSB 0" from calculation mode).

LBL 07STO I0ENTERLBL A142857+SHOW DECPSEDSZGTO ARTN

 I think you can immediately imagine how it will be useful for programming and debugging (for those who have written assemblers), but even writing programs What do you have to do? "You might think that." But think of a workplace where you don't have a computer at hand. The language is very close to the hardware level.

Don't you ever feel hopeless because you can only do a little trial, confirmation, and repetitive work, and it takes a lot of time and effort? At such times, a keyboard macro-like 10- or 20-line program can become almost a "god". In the case of war, the tools are the difference between life. At the beginning of the manual for HP's calculator, it said that it was used by space shuttle astronauts, America's Cup yachtsmen, and Everest climbers.

 In that way, you can put in a number of useful programs in your work and run them from each label. He's a nice guy. So, why don't you take this opportunity to step into the super tiny world of programming? From now on, it's never too late to learn the correct doctrine of RPN. You can often find old HP calculators on eBay and Yahoo auctions.

My HP-25, HP-27, and HP-29C. Both calculators were released in the 1970s, but are still in operation. It's not for programmers like the HP-16C, but it's nice and delicate enough to see the LED display.

 I made the HP-16C with a "block de gadget" that makes historic machines out of blocks. As mentioned in the video, the photo in the middle of the article is the DM-16 compatible calculator for the HP-16C made in Switzerland. Can you convey the feelings of RPN fans, HP calculator fans, and HP-16C fans around the world at least 10 centimeters? "Watch the video below."

■ "Block de Gadget by Satoshi Endo": https://youtu.be/PekeqwWUsg8 ■ Playlist: https://www.youtube.com/playlist?list=PLZRpVgG187CvTxcZbuZvHA1V87Qjl2gyB ■ "in64blocks": https:// www.instagram.com/in64blocks/

Satoshi Endo

Head researcher at Kadokawa ASCII Research Institute. After working as a programmer, he joined ASCII Corporation in 1985. After serving as editor-in-chief of Monthly ASCII and director of ASCII Corporation, he assumed his current position in 2013. Kadokawa ASCII Research Institute conducts surveys and consulting on people's lifestyles in the age of smartphones and the Internet. He is also the author of free software such as "AMSCLS" (used extensively in LHA) and "Thumb Pyun" (thumb shift keyboard emulator). Hobbies include curry, optical illusions, and stationery making. In 2018 and 2019, he was awarded two years in a row at the Japanese Psychological Association's "Illusion/Auditory Illusion Contest". I am making an animation floating pen using the optical illusion. His publications include "Computer Shop Kaku Battle Eri" (ASCII) and "10 Worlds Changed by Smart People NHK IT White Box" (co-author, Kodansha).

Twitter: @hortense667