{"id":1416,"date":"2015-12-12T20:34:57","date_gmt":"2015-12-12T20:34:57","guid":{"rendered":"http:\/\/www.sydneysmith.com\/wordpress\/?p=1416"},"modified":"2017-05-14T00:43:48","modified_gmt":"2017-05-14T00:43:48","slug":"hp-65-pressing-the-a-key","status":"publish","type":"post","link":"https:\/\/www.sydneysmith.com\/wordpress\/1416\/hp-65-pressing-the-a-key\/","title":{"rendered":"HP-65 &#8211; Pressing the [A] key"},"content":{"rendered":"<p>When you press the [A] key the HP-65 calculator starts looking for a &#8220;LBL A&#8221; in program memory and then runs it. Unlike the HP-67 which has a &#8220;(use) default functions&#8221; flag, the HP-65 fires up with its default functions entered into program memory. This simplifies the &#8217;65 processing for [A].<\/p>\n<p>Here&#8217;s what happens:<!--more--><\/p>\n<pre>\r\nHP65 Logging started.\r\n; A= 00000000000999 B= 02009999999999\r\n; S= 0........... P= 1 M =00000000000221\r\n00726 if s9 = 0\r\n00727 goto 00622\r\n00622 12 -&gt; p            ; P= 12\r\n00623 if s0 = 0\r\n00624 goto 00452\r\n...\r\n00627 goto 00625\r\n00630 0 -&gt; s0            ; S= ............\r\n00631 if s10 = 0\r\n00632 goto 00641\r\n00641 if s5 = 0\r\n00642 goto 00734\r\n00734 if s8 = 0\r\n00735 goto 00710\r\n00710 jsb 00675\r\n00675 12 -&gt; p\r\n00676 1 -&gt; f3\r\n00677 dispoff\r\n00700 c &lt;-&gt; m            ; C= 00000000000221 M =00000000000000\r\n00701 shiftl a[w]        ; A= 00000000009990\r\n00702 return\r\n00711 1 -&gt; f7\r\n00712 if s3 = 0\r\n00713 goto 00715\r\n00715 rom 2\r\n01316 key -&gt; rom         ; 036= [A]\r\n\r\n01036 goto 01351         ; FCN40\r\n\r\n; FCN40: Do [A]-[E]\r\n01351 rom 4\r\n02352 0 -&gt; f5            ; S= ...........b\r\n02353 if c[m] = 0\r\n02354 goto 02371\r\n02371 0 -&gt; c[ms]\r\n02372 if s8 = 0\r\n02373 goto 02102\r\n02102 if s9 = 0\r\n02103 goto 02302\r\n;---\r\n02302 search for label\r\n;---\r\n02303 goto 02106\r\n02106 c + 1 -&gt; c[s]      ; C= 10000000000221\r\n; c[s] is probably subroutine depth 1=main, 2=sub, 3=too far, ...\r\n02107 clearstatus        ; S= ............\r\n02110 1 -&gt; s10           ; S= ..........a.\r\n02111 jsb 02376\r\n02376 1 -&gt; s8            ; S= ........8.a.\r\n02377 goto 02260\r\n02260 jsb 02127\r\n;\r\n; MCIRC0:\r\n; wait for prgm mem ready (to \"circulate\" - M CIRC)\r\n; then clear the flag for next time\r\n; clearing should be redundant as test does that\r\n; but maybe some timings cause glitches\r\n; so they clear it again\r\n02127 0 -&gt; s11\r\n02130 0 -&gt; f5\r\n02131 if s11 = 0\r\n02132 goto 02130\r\n02130 0 -&gt; f5            ; S= ........8.ab\r\n02131 if s11 = 0\r\n02132 goto 02130\r\n02133 0 -&gt; f5\r\n02134 return\r\n;\r\n02261 goto 02360\r\n02360 0 -&gt; c[m]          ; clear prefixes\r\n02361 c &lt;-&gt; m            ; C= 00000000000000 M =10000000000221\r\n02362 goto 02045\r\n02045 rom 0\r\n00046 if s8 = 0\r\n00047 goto 00216         ; would 1 -&gt; s10\r\n00050 goto 00217\r\n00217 rom 1\r\n;\r\n00620 if s8 = 0          ; if not running\r\n00621 goto 00531         ; skip this\r\n00622 12 -&gt; p\r\n00623 if s0 = 0          ; if no key press (no interrupt)\r\n00624 goto 00452         ; proceed\r\n; else would loop 16 times (for h\/w to settle?)\r\n; then if s10=1 goto 00622 to wait for finger off the key\r\n; if s10=0 then (interrupt routine?) at 00641\r\n\r\n00452 0 -&gt; s10           ; S= ........8..b\r\n00453 if s5 = 0\r\n00454 goto 00750\r\n00750 if s8 = 0\r\n00751 goto 00441\r\n\r\n; get an instruction from prgm mem\r\n00752 pointer advance\r\n00753 disptoggle\r\n00754 c &lt;-&gt; m            ; C= 10000000000221 M =00000000000000\r\n...\r\n<\/pre>\n<p>It looks like s10 is a &#8220;don&#8217;t interrupt&#8221; flag for the current instruction. It might be used to cause a SST of a subroutine to complete in a single step (?). It might just be a &#8220;let me complete this one step properly, then I&#8217;ll stop&#8221; flag.<\/p>\n<p>The main things above are:<br \/>\n02302 search for label<br \/>\n02106 c + 1 -&gt; c[s]<br \/>\n02376 1 -&gt; s8 ; set running<br \/>\n00750 &#8230; ; if running get next step from prgm mem<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you press the [A] key the HP-65 calculator starts looking for a &#8220;LBL A&#8221; in program memory and then runs it. Unlike the HP-67 which has a &#8220;(use) default functions&#8221; flag, the HP-65 fires up with its default functions entered into program memory. This simplifies the &#8217;65 processing for [A]. Here&#8217;s what happens:<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,5,39],"tags":[37,32],"_links":{"self":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1416"}],"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=1416"}],"version-history":[{"count":4,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1416\/revisions"}],"predecessor-version":[{"id":1420,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1416\/revisions\/1420"}],"wp:attachment":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}