{"id":2333,"date":"2019-07-28T01:37:21","date_gmt":"2019-07-28T01:37:21","guid":{"rendered":"http:\/\/www.sydneysmith.com\/wordpress\/?p=2333"},"modified":"2019-07-28T21:15:24","modified_gmt":"2019-07-28T21:15:24","slug":"hp-25-undocumented-features","status":"publish","type":"post","link":"https:\/\/www.sydneysmith.com\/wordpress\/2333\/hp-25-undocumented-features\/","title":{"rendered":"HP-25 Undocumented Features"},"content":{"rendered":"<p>The HP-25 was a great calculator. It had heaps of features right there on the keyboard. These included conversions between Rectangular and Polar coordinates and between Degrees \/ Minutes \/ Seconds and decimal degrees. It even had ENGineering notation and GRaDians. It was programmable and was, in some ways, better than the previous top of the line &#8211; the HP-65. From a programmable perspective, it had less steps (49) than the &#8217;65 (100) but all 49 were fully merged. That meant if you needed two or three keystrokes for a function, all two or three would be stored in a single program step. The &#8217;65 was similar; but not all combinations were fully merged. The biggest difference for me was the program display. The &#8217;65 would usually display the keycode of the current program step, but not always. The HP-25 always displays the step number and the keycode. It is much easier to use.<\/p>\n<p>What is truly impressive is the leap from the Classics to the Woodstock series of calculators. The HP-25 had SST (single step) and BST (back step), eight conditional tests, PAUSE, NOP, &#8220;hold down the key to see the program keycode&#8221; and INT and FRAC functions. When you added Continuous Memory with the HP-25C, it was even easier to load your favourite program than a HP-65 (instead of inserting a mag card, it was just &#8220;already there&#8221;). The HP-65 still excelled in some areas but the HP-25 wasn&#8217;t far from it. It&#8217;s no wonder it was so popular. I sure loved mine at the time. But all that isn&#8217;t the point of this article.<\/p>\n<p>There are some things they didn&#8217;t tell you about. <!--more--><\/p>\n<p>The HP-65 and HP-67 calculators had card readers. You could load and save programs with those calculators. It was all perfectly reasonable &#8211; but then people discovered they could load &#8220;broken&#8221; programs and that they could load and run program steps that couldn&#8217;t be keyed in. It turned out that none of the extra functions did anything useful so the interest faded.<\/p>\n<p>The HP-25 has similar &#8220;prgcode&#8221;s that can&#8217;t normally be keyed in from the keyboard in PRGM mode. There are a lot of them actually (16+16+3&#215;6+3&#215;3+2= 61).<\/p>\n<p>Now, despite conventional wisdom that extra &#8220;prgcode&#8221;s don&#8217;t do anything useful, on the HP-25 some of them do!<\/p>\n<p>They don&#8217;t calculate: the integral of an entered function, or the direction and distance from you to any selected planet in your current solar system; so prune back your expectations a little. Here&#8217;s the interesting ones:<\/p>\n<table>\n<tr>\n<td>Code<\/td>\n<td>Shows as<\/td>\n<td>Does<\/td>\n<\/tr>\n<tr>\n<td>&#8220;ab&#8221;<\/td>\n<td>&#8220;14 0F&#8221;<\/td>\n<td>ram[3]++ ie adds 1 to mem 3<\/td>\n<\/tr>\n<tr>\n<td>&#8220;ae&#8221;<\/td>\n<td>&#8220;14 0E&#8221;<\/td>\n<td>(play dead) = display off, looping, no exit. Switch off\/on again or restart emulator<\/td>\n<\/tr>\n<tr>\n<td>&#8220;af&#8221;<\/td>\n<td>&#8220;14 0 &#8220;<\/td>\n<td>(play dead)<\/td>\n<\/tr>\n<tr>\n<td>&#8220;bb&#8221;<\/td>\n<td>&#8220;15 0F&#8221;<\/td>\n<td>STO+3<\/td>\n<\/tr>\n<tr>\n<td>&#8220;ca&#8221;<\/td>\n<td>&#8220;0r&#8221;<\/td>\n<td>10.00 &#8211; puts 10 in X<\/td>\n<\/tr>\n<tr>\n<td>&#8220;cb&#8221;<\/td>\n<td>&#8220;0F&#8221;<\/td>\n<td>11.00 &#8211; puts 11 in X<\/td>\n<\/tr>\n<tr>\n<td>&#8220;cc&#8221;<\/td>\n<td>&#8220;0o&#8221;<\/td>\n<td>12.00 &#8211; puts 12 in X<\/td>\n<\/tr>\n<tr>\n<td>&#8220;cd&#8221;<\/td>\n<td>&#8220;0P&#8221;<\/td>\n<td>13.00 &#8211; puts 13 in X<\/td>\n<\/tr>\n<tr>\n<td>&#8220;ce&#8221;<\/td>\n<td>&#8220;0E&#8221;<\/td>\n<td>14.00 &#8211; puts 14 in X<\/td>\n<\/tr>\n<tr>\n<td>&#8220;cf&#8221;<\/td>\n<td>&#8220;0 &#8220;<\/td>\n<td>15.00 &#8211; puts 15 in X<\/td>\n<\/tr>\n<tr>\n<td>&#8220;ed&#8221;<\/td>\n<td>&#8220;15 00&#8221;<\/td>\n<td>ENTER<\/td>\n<\/tr>\n<tr>\n<td>&#8220;ee&#8221;<\/td>\n<td>&#8220;15 00&#8221;<\/td>\n<td>(overwrite). Next val will overwrite X, eg digit entry or RCL<\/td>\n<\/tr>\n<\/table>\n<p>The HP-25 is a very good actor and the play dead ones are very good impressions. It&#8217;s not really dead because you can see (in an emulator or a logic analyser) that the processor is still busily doing things.<\/p>\n<p>Some of the unused prgcodes trigger the &#8220;Error&#8221; display. If these are used in a program the &#8220;Error&#8221; will stop the program so, in that respect, they are like R\/S. If you had a program that does something like: &#8220;0, 1\/x&#8221; specifically to show &#8220;Error&#8221; in the display; you could use one of these to save a program step. They are: &#8220;80&#8221;-&#8220;8f&#8221;, &#8220;bf&#8221; (&#8220;15 0 &#8220;), &#8220;dd&#8221; &#038; &#8220;de&#8221; (both display as &#8220;14 00&#8221;), &#8220;df&#8221; (&#8220;14 40&#8221;), &#8220;e6&#8221; (&#8220;15 31&#8221;), &#8220;fd&#8221; &#038; &#8220;fe&#8221; (&#8220;00&#8221;), and &#8220;ff&#8221; (&#8220;40&#8221;).<\/p>\n<p>The remaining ones don&#8217;t change flags, stack values or memories. Some do a little or a lot of processing; but always without any big picture effect. They can be considered as NOPs. They are: &#8220;90&#8221;-&#8220;9f&#8221;, &#8220;aa&#8221; (&#8220;14 0r&#8221;), &#8220;ac&#8221; (&#8220;14 0o&#8221;), &#8220;ad&#8221; (&#8220;14 0P&#8221;), &#8220;ba&#8221; (&#8220;15 0r&#8221;), &#8220;bc&#8221; (&#8220;15 0o&#8221;), &#8220;bd&#8221; (&#8220;15 0P&#8221;), &#8220;be&#8221; (&#8220;15 0E&#8221;), &#8220;ec&#8221; (&#8220;15 25&#8221;) and &#8220;ef&#8221; (&#8220;15 40&#8221;).<\/p>\n<p>&#8220;ec&#8221; (&#8220;15 25&#8221;) is the g SUM+ function I&#8217;ve wondered about for some time now. <\/p>\n<p>&#8220;e6&#8221; (&#8220;15 31&#8221;) looks similar (g ENTER) but it can&#8217;t be keyed into a HP-25 in PRGM mode.<\/p>\n<h2>How do I use that?<\/h2>\n<p>If the HP-25 had a magnetic card reader, we&#8217;d load mag cards with the values. Given it doesn&#8217;t, the usefulness of these codes is rather limited.<\/p>\n<p>That said, many emulators have the ability to enter prgcodes directly into program memory and to save and load programs. If you&#8217;ve got one of those (eg <a href=\"http:\/\/www.sydneysmith.com\/products\/hp25u\/run\/app.html\" rel=\"noopener\" target=\"_blank\">hp25u<\/a>), program step 01 is the LHS of ram[9], program step 07 is the RHS, program step 08 is the LHS of ram[10], and so on.<\/p>\n<p>Back in the day, Eric Smith came up with (or documented) ways of holding down multiple keys to directly enter unused prgcodes into a real-world HP-67. Something similar may be possible with the HP-25\/C. It depends on the mappings of scancodes across rows and columns of the keyboard and the processing that happens as a result. The HP-25 processing isn&#8217;t a simple state and scancode to prgcode translation so an equivalent trick isn&#8217;t yet obvious. I&#8217;ll let you know if that changes.<\/p>\n<h2>Addendum<\/h2>\n<p>The &#8220;80&#8221;-&#8220;8f&#8221; prgcodes play havoc with the display keycode part of PRGM mode. You&#8217;ll find life easier if you don&#8217;t switch to PRGM if you are at one of those, or if you&#8217;re at 00 and one is in step 01. You won&#8217;t be able to start a program with one, as R\/S tries to show the keycode as its first action. You won&#8217;t be able to SST through one. They&#8217;re not as fatal as non-normalised numbers in a HP-97, but they do get in the way. If you see a blank display, switch back to RUN and clear &#8220;Error&#8221; if that shows up. If all else fails: power OFF\/ON on a real HP-25 or restart the emulator (on the hp25u that&#8217;s just hit refresh in the browser). The HP-25C doesn&#8217;t preserve the M1 register so restarting that will take you to step 00. You&#8217;ll still be stuck if there&#8217;s one of these codes in step 01. You may need to (disconnect any charger then) remove the battery, switch the calculator ON, and wait for CMOS to clear.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The HP-25 was a great calculator. It had heaps of features right there on the keyboard. These included conversions between Rectangular and Polar coordinates and between Degrees \/ Minutes \/ Seconds and decimal degrees. It even had ENGineering notation and GRaDians. It was programmable and was, in some ways, better than the previous top of &hellip; <a href=\"https:\/\/www.sydneysmith.com\/wordpress\/2333\/hp-25-undocumented-features\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">HP-25 Undocumented Features<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,5,69],"tags":[],"_links":{"self":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/2333"}],"collection":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2333"}],"version-history":[{"count":6,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/2333\/revisions"}],"predecessor-version":[{"id":2339,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/2333\/revisions\/2339"}],"wp:attachment":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}