{"id":1379,"date":"2015-12-07T11:12:13","date_gmt":"2015-12-07T11:12:13","guid":{"rendered":"http:\/\/www.sydneysmith.com\/wordpress\/?p=1379"},"modified":"2017-05-14T00:46:03","modified_gmt":"2017-05-14T00:46:03","slug":"hp-65-display-program-step","status":"publish","type":"post","link":"https:\/\/www.sydneysmith.com\/wordpress\/1379\/hp-65-display-program-step\/","title":{"rendered":"HP-65 Display Program Step"},"content":{"rendered":"<p>How does the HP-65 display a program step? If you run the HP-65 emulator with logging turned on and flick the switch to W\/PRGM you&#8217;ll see. Here&#8217;s the details: <!--more--><\/p>\n<p>The HP-65 <a href=\"http:\/\/www.sydneysmith.com\/wordpress\/1327\/the-hp65-wait-loop\/\">wait loop<\/a> goes from 00726 &#8211; 00777. That&#8217;s the main starting point for everything other than &#8220;power up&#8221;. The wait loop jumps around a lot in the process of getting to 00777 and, in the course of that, it goes through:<\/p>\n<pre>\r\n; S= ............ P= 1 C= 00000000000221 M =00000000000000\r\n\r\n00537 if s3 = 0                     ; if RUN\r\n00540 goto 00552                    ; NOTE: W\/PRGM overrides s3. s3 appears 0 but goto doesn&#39;t happen\r\n;\r\n; display current prgm step\r\n;\r\n00541 if s11 = 0\r\n00542 goto 00721\r\n00721 if c[p] &gt;= 1\r\n00722 goto 00742\r\n00742 c - 1 -&gt; c[p]                 ; C= 00000000000211\r\n00743 c - 1 -&gt; c[p]                 ; C= 00000000000201\r\n00744 if c[p] &gt;= 1                  ; see 00746 if c[p] gets set to 3, skip all this\r\n00745 goto 00774\r\n;\r\n; work out what to display\r\n;\r\n00746 load 3                        ; C= 00000000000231 P= 0 (skip this next time)\r\n00747 goto 00724\r\n00724 0 -&gt; c[m]\r\n00725 jsb 00543\r\n.00543 c &lt;-&gt; m                       ; C= 00000000000000 M =00000000000231\r\n.00544 delayed select group 1        ; 1*04000\r\n.00545 rom 3                         ; 3*00400\r\n.05546 dispoff                       ; 05546= 04000&#43;01400&#43;0146\r\n.05547 0 -&gt; f2                       ; S= ...........b\r\n.05550 c -&gt; a[w]                     ; A= 00000000000000\r\n.05551 a &lt;-&gt; b[w]                    ; A= 02009999999999 B= 00000000000000\r\n.05552 1 -&gt; s5                       ; S= .....5.....b (s5=mem full)\r\n.05553 memory full -&gt; a              ; A= 02009999999990\r\n.05554 0 -&gt; p\r\n.05555 if a[p] &gt;= 1                  ; if prog[100] != nop\r\n.05556 goto 05560\r\n.05557 0 -&gt; s5                       ; S= ...........b (wasn&#39;t full)\r\n.05560 0 -&gt; a[w]                     ; A= 00000000000000\r\n.05561 a - 1 -&gt; a[w]                 ; A= 99999999999999\r\n.05562 shiftl a[m]                   ; A= 99999999990999\r\n.05563 shiftl a[m]                   ; A= 99999999900999\r\n.05564 0 -&gt; c[w]\r\n.05565 4 -&gt; p                        ; P= 4\r\n.05566 0 -&gt; s4\r\n.05567 buffer -&gt; rom address         ; setup for computed goto (in this case with 077)\r\n.05570 goto 05400                    ; to 077 = start marker, show &quot;00 00&quot;\r\n;\r\n.05477 1 -&gt; s4                       ; S= ....4......b\r\n.05500 jsb 05744                     ; but only 1 level jsb supported\r\n.05744 if s4 = 0\r\n.05745 goto 05711\r\n.05746 0 -&gt; s4                       ; S= ...........b\r\n.05747 a &lt;-&gt; c[w]                    ; A= 00000000000000 C= 99999999900999\r\n.05750 shiftl a[m]\r\n.05751 shiftl a[m]\r\n.05752 shiftl a[m]\r\n.05753 7 -&gt; p                        ; P= 7\r\n.05754 load 0                        ; C= 99999909900999 P= 6\r\n.05755 load 0                        ; C= 99999900900999 P= 5\r\n.05756 a &lt;-&gt; c[w]                    ; A= 99999900900999 C= 00000000000000\r\n.05757 4 -&gt; p                        ; P= 4\r\n.05760 return\r\n05501 goto 05744\r\n05744 if s4 = 0\r\n05745 goto 05711\r\n;\r\n05711 if s5 = 0                     ; if not mem full, skip next bit\r\n05712 goto 05723\r\n05723 a &lt;-&gt; c[w]                    ; A= 00000000000000 C= 99999900900999\r\n05724 b &lt;-&gt; c[w]                    ; B= 99999900900999 C= 00000000000000\r\n05725 clearstatus                   ; S= ............\r\n05726 delayed select group 0        ; 0*04000\r\n05727 rom 1                         ; 1*00400\r\n00730 0 -&gt; s9                       ; 00730=00000&#43;00400&#43;0330\r\n00731 1 -&gt; s10                      ; S= ..........a.\r\n00732 disptoggle                    ; =&quot;      00 00   &quot;\r\n00733 goto 00622\r\n;\r\n00622 ...                           ; (back into the wait loop)\r\n00745 goto 00774\r\n;\r\n; if already done, skips to here\r\n;\r\n00774 c &#43; 1 -&gt; c[p]                 ; C= 00000000000221\r\n00775 c &#43; 1 -&gt; c[p]                 ; C= 00000000000231\r\n00776 c &lt;-&gt; m                       ; C= 00000000000000 M =00000000000231\r\n00777 goto 00726\r\n<\/pre>\n<p>If the current program step is other than 077 (top of program marker) then &#8220;05570 goto 05400&#8221; will goto a microcode step appropriate for the program step and the display will show something other than &#8220;00 00&#8221;.<\/p>\n<p>See also:<br \/>\n<a href=\"http:\/\/www.sydneysmith.com\/wordpress\/1406\/hp-65-display-x-in-fixed-mode\/\">HP-65 Display X in fixed mode<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How does the HP-65 display a program step? If you run the HP-65 emulator with logging turned on and flick the switch to W\/PRGM you&#8217;ll see. Here&#8217;s the details:<\/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\/1379"}],"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=1379"}],"version-history":[{"count":5,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1379\/revisions"}],"predecessor-version":[{"id":1412,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1379\/revisions\/1412"}],"wp:attachment":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}