{"id":5511,"date":"2023-11-20T17:08:58","date_gmt":"2023-11-20T16:08:58","guid":{"rendered":"https:\/\/msxitalia.org\/?p=5511"},"modified":"2023-11-24T13:52:12","modified_gmt":"2023-11-24T12:52:12","slug":"msx-basic-tabella-tasti","status":"publish","type":"post","link":"https:\/\/msxitalia.org\/en\/msx-basic-tabella-tasti\/","title":{"rendered":"MSX BASIC \u2013 MSX key table"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><img decoding=\"async\" data-src=\"https:\/\/msxitalia.org\/wp-content\/uploads\/2023\/11\/Corso-Basic-MSX1-OC-300x225.jpg\" class=\"size-medium wp-image-5338 aligncenter lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"\" width=\"300\" height=\"225\" \/><noscript><img decoding=\"async\" class=\"size-medium wp-image-5338 aligncenter\" src=\"https:\/\/msxitalia.org\/wp-content\/uploads\/2023\/11\/Corso-Basic-MSX1-OC-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\"><\/noscript><\/p>\r\n<h1 dir=\"auto\" style=\"text-align: center;\">\u201cMSX BASIC\u201d COLUMN by Orazio Cacciola (bonus)<\/h1>\r\n<h2 style=\"text-align: center;\">MSX key table<\/h2>\r\n<p><img decoding=\"async\" data-src=\"https:\/\/msxitalia.org\/wp-content\/uploads\/2023\/11\/Screenshot-2023-11-20-170304.png\" class=\"size-full wp-image-5513 aligncenter lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"\" width=\"600\" height=\"535\" \/><noscript><img decoding=\"async\" class=\"size-full wp-image-5513 aligncenter\" src=\"https:\/\/msxitalia.org\/wp-content\/uploads\/2023\/11\/Screenshot-2023-11-20-170304.png\" alt=\"\" width=\"600\" height=\"535\" srcset=\"https:\/\/msxitalia.org\/wp-content\/uploads\/2023\/11\/Screenshot-2023-11-20-170304.png 600w, https:\/\/msxitalia.org\/wp-content\/uploads\/2023\/11\/Screenshot-2023-11-20-170304-480x428.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 600px, 100vw\" \/><\/noscript><\/p>\r\n<p>I insert the table in the explanation to make it better understood.<\/p>\r\n<p>It is a matrix table that starts from the address &amp;HFBE5 up to &amp;HFBEF i.e. 11X8, but in some bits there are 2 keys inserted so we can say that it could be an 11\u00d716. To get the second entry of the key where it is shown, you must add the appropriate key to execute it.\u00a0<br \/>To make you understand better, if we want to use the F1 key just press it, but if we instead want to use the F6 key we must combine the SHIFT + F1 keys.<br \/>To do this we call the address where the key is shown and set the bit used to zero. The bits go from 0 to 7 starting from right to left. We always take into consideration the F1 key located at the address &amp;HFBEB in the fifth bit. First of all we create a variable and to make everything easier we use binary numbers: A=&amp;B11011111, we set the 5th bit to zero, which is the F1 key, then using PEEK to read the location concerned we compare it with the variable, if the button is pressed they will be the same.<br \/>I&#039;ll give you an example of a small program to help you understand better:<\/p>\r\n<pre>10 SCREEN 0: KEYOFF: DEFINT AZ<br \/>20 A=&amp;B11011111: IF(PEEK(&amp;HFBEB)OR A)=A THEN PRINT &quot;F1&quot;<br \/>30 A=&amp;B11111101: IF(PEEK(&amp;HFBEB)OR A)=A THEN PRINT &quot;CTRL&quot;<br \/>40 A=&amp;B01111111: IF(PEEK(&amp;HFBEC)OR A)=A THEN PRINT &quot;ENTER&quot;<br \/>50 A=&amp;B11111011: IF(PEEK(&amp;HFBEC)OR A)=A THEN PRINT &quot;ESC&quot;: END<br \/>60 GOTO 20<\/pre>\r\n<p>Try it and you will see that by pressing the keys used it will print them on the screen, while ESC will close the program as well as printing it.<br \/>If instead we want to use the second bit of the matrix address we will do this:<\/p>\r\n<pre>10 SCREEN 0: KEYOFF: DEFINT AZ<br \/>20 A=&amp;B11011111:B=&amp;B11111110: IF(PEEK(&amp;HFBEB)OR A)=A AND<br \/>(PEEK(&amp;HFBEB)OR B)=B<br \/>THEN PRINT &quot;F6&quot;<br \/>30 GOTO 20<\/pre>\r\n<p>Let&#039;s check the pressure of the 2 keys at the same time, if this is true it will print the sentence F6, if not the program will run infinitely<br \/>without printing anything.<br \/>I tried to simplify by making the explanation very simple.<\/p>\r\n<p>Let me know if anything is unclear<\/p>","protected":false},"excerpt":{"rendered":"<p>RUBRICA &#8220;MSX BASIC&#8221; a cura di Orazio Cacciola (bonus) Tabella tasti MSX Inserisco la tabella nella spiegazione per fare capire meglio. \u00c8 una tabella a matrice che parte dall&#8217;indirizzo &amp;HFBE5 fino al &amp;HFBEF cio\u00e8 11X8, per\u00f2 in alcuni bit ci sono inseriti 2 tasti perci\u00f2 possiamo dire che potrebbe essere una 11&#215;16. Per ottenere la [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[14],"tags":[],"dipi_cpt_category":[],"class_list":["post-5511","post","type-post","status-publish","format-standard","hentry","category-msx-basic"],"_links":{"self":[{"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/posts\/5511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/comments?post=5511"}],"version-history":[{"count":1,"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/posts\/5511\/revisions"}],"predecessor-version":[{"id":5514,"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/posts\/5511\/revisions\/5514"}],"wp:attachment":[{"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/media?parent=5511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/categories?post=5511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/tags?post=5511"},{"taxonomy":"dipi_cpt_category","embeddable":true,"href":"https:\/\/msxitalia.org\/en\/wp-json\/wp\/v2\/dipi_cpt_category?post=5511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}