{"id":1169,"date":"2015-10-28T12:34:38","date_gmt":"2015-10-28T12:34:38","guid":{"rendered":"http:\/\/www.sydneysmith.com\/wordpress\/?p=1169"},"modified":"2017-05-14T01:47:45","modified_gmt":"2017-05-14T01:47:45","slug":"hp67-card-reader-default-functions","status":"publish","type":"post","link":"https:\/\/www.sydneysmith.com\/wordpress\/1169\/hp67-card-reader-default-functions\/","title":{"rendered":"HP67 Card Reader &#8211; Default Functions"},"content":{"rendered":"<p>The HP67 card reader contains two instructions that control a &#8220;default functions&#8221; flag.<\/p>\n<p>The card reader integrated circuit is a Mostek MK6250N. That connects to the Arithmetic, Control and Timing (ACT) chip and actions a number of instructions that the ACT doesn&#8217;t understand. Instructions are 10 bits long. For this article the ones we are interested in are:<!--more--><\/p>\n<p>01000 = Set the Default Functions flag, and<br \/>\n01100 = Test the Default Functions flag.<\/p>\n<p>The Default Functions flag controls what happens when you press the [A] through [E] keys. If it is set then [A] through [E] do the default functions ([A]=1\/x, [B]=sqrt(x), [C]=y^x, [D]=R dn, [E]=x&lt;-&gt;y). If it is clear then [A] through [E] run user-created subroutines that start with &#8220;f LBL A&#8221; through &#8220;f LBL E&#8221;.<\/p>\n<p>Loading a magnetic card clears the flag. Interestingly, this is the case even if you&#8217;ve loaded a data card and there are no user-created subroutines at all.<\/p>\n<p>The 01000 (set-dflt) instruction appears in the HP67 roms as follows:<\/p>\n<p>01013: CRC 1000<br \/>\n; this seems to be initialization. it is amongst a lot of &#8220;clear data registers&#8221;<br \/>\n; and setting defaults (angle, FIX, DSP 2) in register s14 (internal)<\/p>\n<p>01065: CRC 1000<br \/>\n; this is probably in CL PRGM<br \/>\n; as it includes code (load constant 2; jsb 01047) to clear prog 001-112<br \/>\n; and code (load constant 1; jsb 01047) to clear prog 113-224<\/p>\n<p>01700: CRC 1000<br \/>\n; this happens after test\/clearing the flag if it was set<br \/>\n; see below<br \/>\n01670: 0 -&gt; s 3<br \/>\n01671: CRC 1100<br \/>\n01672: if 1 = s 3<br \/>\n01673: then go to 01676<br \/>\n&#8230;<br \/>\n01676: load constant 4<br \/>\n01677: p &lt;- 1<br \/>\n01700: CRC 1000<\/p>\n<p>The 01100 (test-dflt) instruction sets s 3 if the Default Functions flag was set. The instruction also clears the flag after testing it. It appears as follows:<\/p>\n<p>00344: CRC 1100<br \/>\n; appears to be just clearing it<br \/>\n; perhaps if there are program steps<\/p>\n<p>01671: CRC 1100<br \/>\n; as above: test, if was set then set it again<\/p>\n<p>13665: CRC 1100<br \/>\n; clear it<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The HP67 card reader contains two instructions that control a &#8220;default functions&#8221; flag. The card reader integrated circuit is a Mostek MK6250N. That connects to the Arithmetic, Control and Timing (ACT) chip and actions a number of instructions that the ACT doesn&#8217;t understand. Instructions are 10 bits long. For this article the ones we are &hellip; <a href=\"https:\/\/www.sydneysmith.com\/wordpress\/1169\/hp67-card-reader-default-functions\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">HP67 Card Reader &#8211; Default Functions<\/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,3],"tags":[33,32],"_links":{"self":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1169"}],"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=1169"}],"version-history":[{"count":2,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1169\/revisions"}],"predecessor-version":[{"id":1311,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1169\/revisions\/1311"}],"wp:attachment":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}