{"id":1479,"date":"2015-12-30T00:13:05","date_gmt":"2015-12-30T00:13:05","guid":{"rendered":"http:\/\/www.sydneysmith.com\/wordpress\/?p=1479"},"modified":"2017-05-14T00:40:18","modified_gmt":"2017-05-14T00:40:18","slug":"hp-65-gto","status":"publish","type":"post","link":"https:\/\/www.sydneysmith.com\/wordpress\/1479\/hp-65-gto\/","title":{"rendered":"HP-65 GTO"},"content":{"rendered":"<p>The GTO function is pretty straight forward in the HP-65 calculator. Here&#8217;s how it works: <!--more--><\/p>\n<p>GTO from the keyboard looks like this:<\/p>\n<pre>\r\n00715 rom 2\r\n01316 key -&gt; rom         ; f= ..23.5..\r\n\r\n; [GTO]\r\n01054 goto 01347\r\n01347 rom 4\r\n02350 buffer -&gt; rom address\r\n02351 goto 02000\r\n02054 goto 02166 <\/pre>\n<p>It goes on to set M[11] to 1:<\/p>\n<pre>\r\n02120 c + 1 -&gt; c[p]  ; C= 00100000000221 (set GTO prefix)\r\n02276 c &lt;-&gt; m        ; C= 00000000000000 M= 00100000000221<\/pre>\n<p>Then when [C] is pressed: <\/p>\n<pre>\r\n00715 rom 2\r\n01316 key -&gt; rom     ; f= ..23.5..\r\n\r\n; [C] pressed\r\n01033 goto 01351\r\n01351 rom 4\r\n02352 0 -&gt; f5        ; S= ...........b f= ..23.... <\/pre>\n<p>It determines that GTO was pressed beforehand:<\/p>\n<pre>\r\n02366 11 -&gt; p        ; P= 11\r\n02367 if c[p] &gt;= 1\r\n02370 goto 02257 <\/pre>\n<p>and ends up here:<\/p>\n<pre>\r\n; doing GTO C\r\n02257 search for label   ; f= ..23....\r\n02260 (wait for ready)\r\n02261 goto 02360\r\n02360 0 -&gt; c[m]      ; C= 00000000000221\r\n02361 c &lt;-&gt; m        ; C= 00000000000000 M= 00000000000221\r\n02362 ...\r\ndisplay: <\/pre>\n<p>There is nothing fancy in the process. It doesn&#8217;t start running. It doesn&#8217;t save a return address or activate a secondary pointer. It&#8217;s just:<\/p>\n<p>if GTO pressed set prefix-GTO<br \/>\nif C pressed<br \/>\n&nbsp;&nbsp;if prefix-GTO<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;search for label<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;clear prefixes<br \/>\n&#8230;<\/p>\n<p>In a program it works the same way:<\/p>\n<pre>\r\n00763 rom 2          ; f= ..23.5..\r\n01364 buffer -&gt; rom address\r\n01365 goto 01000\r\n\r\n; 054 = GTO\r\n01054 goto 01347 <\/pre>\n<p>and <\/p>\n<pre>\r\n00763 rom 2          ; f= ..23.5..\r\n01364 buffer -&gt; rom address\r\n01365 goto 01000\r\n\r\n; 036 = [A]\r\n01036 goto 01351\r\n01351 rom 4\r\n02352 0 -&gt; f5        ; f= ..23.... <\/pre>\n<p>The program uses GTO A but the process is the same. The only differences are: <\/p>\n<ol>\n<li>It checks and re-sets the running flag again when it does a &#8220;clear status&#8221;.<\/li>\n<li>If running it goes to get next program step instead of wait for key press.<\/li>\n<\/ol>\n<p>More detail is available in <a href=\"http:\/\/www.sydneysmith.com\/products\/gss-hp65\/downloads\/65-gto-c.txt\" target=\"_blank\">65-gto-c.txt<\/a>.<\/p>\n<p>The mechanism splits the GTO and the target label into two program steps ([GTO] then [C]). This opens the door to interesting combinations like &#8220;GTO&#8221; &#8220;STO 6&#8221;. Whilst interesting, they are unlikely to do anything as most invalid combinations just clear prior prefixes. In this case the GTO would start (set a prefix) then get ignored (prefix reset) as the &#8220;STO 6&#8221; gets run.<\/p>\n<p>The HP-67 merges the GTO program step so you don&#8217;t get the chance to tinker this way. Of course it has 8-bit program steps instead of the 6-bit ones that the HP-65 uses. That gives the HP-67 more scope for merging steps.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GTO function is pretty straight forward in the HP-65 calculator. Here&#8217;s how it works:<\/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\/1479"}],"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=1479"}],"version-history":[{"count":6,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1479\/revisions"}],"predecessor-version":[{"id":1485,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1479\/revisions\/1485"}],"wp:attachment":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}