Keystroke programming: Difference between revisions

Content deleted Content added
References: Added See also section with FOCAL
m Example: TI Calculators: class="wikitable" !
Line 5:
The Texas Instruments [[TI-58]]/[[TI-58C]]/[[TI-59]] calculators were programmable, and program storage took the form of a sequence of codes which (mostly) corresponded to the position of keys on the calculator keypad. Here is a simplified diagram of the basic key layout:
 
{| border="1" cellpadding="2" class="wikitable"
|----
|! ||''x''1||''x''2||''x''3||''x''4||''x''5
|-
|!1''x''
|{{TI-5x/Keys/Brown| A }}||{{TI-5x/Keys/Brown| B }}||{{TI-5x/Keys/Brown| C }}||{{TI-5x/Keys/Brown| D }}||{{TI-5x/Keys/Brown| E }}
|-
|!2''x''
|{{TI-5x/Keys/Yellow|2nd}}||{{TI-5x/Keys/Brown|INV}}||{{TI-5x/Keys/Brown|ln''x''}}||{{TI-5x/Keys/Brown|CE}}||{{TI-5x/Keys/Yellow|CLR}}
|-
|!3''x''
|{{TI-5x/Keys/Brown|LRN}}||{{TI-5x/Keys/Brown|x⇌t}}||{{TI-5x/Keys/Brown|x²}}||{{TI-5x/Keys/Brown|√x}}||{{TI-5x/Keys/Brown|1/x}}
|-
|!4''x''
|{{TI-5x/Keys/Brown|SST}}||{{TI-5x/Keys/Brown|STO}}||{{TI-5x/Keys/Brown|RCL}}||{{TI-5x/Keys/Brown|SUM}}||{{TI-5x/Keys/Brown|y<sup>x</sup>}}
|-
|!5''x''
|{{TI-5x/Keys/Brown|BST}}||{{TI-5x/Keys/Brown|EE}}||{{TI-5x/Keys/Brown|&nbsp;(&nbsp;}}||{{TI-5x/Keys/Brown|&nbsp;)&nbsp;}}||{{TI-5x/Keys/Yellow|&nbsp;÷&nbsp;}}
|-
|!6''x''
|{{TI-5x/Keys/Brown|GTO}}||{{TI-5x/Keys/White|&nbsp;7&nbsp;}}||{{TI-5x/Keys/White|&nbsp;8&nbsp;}}||{{TI-5x/Keys/White|&nbsp;9&nbsp;}}||{{TI-5x/Keys/Yellow|&nbsp;×&nbsp;}}
|-
|!7''x''
|{{TI-5x/Keys/Brown|SBR}}||{{TI-5x/Keys/White|&nbsp;4&nbsp;}}||{{TI-5x/Keys/White|&nbsp;5&nbsp;}}||{{TI-5x/Keys/White|&nbsp;6&nbsp;}}||{{TI-5x/Keys/Yellow|&nbsp;-&nbsp;}}
|-
|!8''x''
|{{TI-5x/Keys/Brown|RST}}||{{TI-5x/Keys/White|&nbsp;1&nbsp;}}||{{TI-5x/Keys/White|&nbsp;2&nbsp;}}||{{TI-5x/Keys/White|&nbsp;3&nbsp;}}||{{TI-5x/Keys/Yellow|&nbsp;+&nbsp;}}
|-
|!9''x''
|{{TI-5x/Keys/Brown|R/S}}||{{TI-5x/Keys/White|&nbsp;0&nbsp;}}||{{TI-5x/Keys/White|&nbsp;.&nbsp;}}||{{TI-5x/Keys/White|+/-}}||{{TI-5x/Keys/Yellow|&nbsp;&#61;&nbsp;}}
|----
Line 42:
Now consider a very simple program, which adds 2 to the number being displayed, and then stops. The program is entered starting from program ___location 000, and looks like this:
 
{| class="wikitable"
{|
|-
|!Location||Contents||Meaning||Comments
|-
|000||85||+||
|-
|001||02||2||
|-
|002||95||=||compute result
Line 76:
The code for this alternate function is derived from that of the original key function by adding 5 to the units digit (''without'' carry to the tens digit). Thus, the key codes corresponding to the position of the {{TI-5x/Keys/Yellow|2nd}} key itself (21 and 26) are never used as opcodes. Here is the table of the codes produced with the {{TI-5x/Keys/Yellow|2nd}} prefix:
 
{| border="1" cellpadding="2" class="wikitable"
|----
|!&nbsp;||''x''6||''x''7||''x''8||''x''9||''x''0
|-
|!1''x''
|{{TI-5x/Keys/Alt|&nbsp;A´&nbsp;}}||{{TI-5x/Keys/Alt|&nbsp;B´&nbsp;}}||{{TI-5x/Keys/Alt|&nbsp;C´&nbsp;}}||{{TI-5x/Keys/Alt|&nbsp;D´&nbsp;}}||{{TI-5x/Keys/Alt|&nbsp;E´&nbsp;}}
|-
|!2''x''
|&nbsp;||{{TI-5x/Keys/Brown|INV}}||{{TI-5x/Keys/Alt|log}}||{{TI-5x/Keys/Alt|CP}}||{{TI-5x/Keys/Yellow|CLR}}
|-
|!3''x''
|{{TI-5x/Keys/Alt|Pgm}}||{{TI-5x/Keys/Alt|P→R}}||{{TI-5x/Keys/Alt|sin}}||{{TI-5x/Keys/Alt|cos}}||{{TI-5x/Keys/Alt|tan}}
|-
|!4''x''
|{{TI-5x/Keys/Alt|Ins}}||{{TI-5x/Keys/Alt|CMs}}||{{TI-5x/Keys/Alt|Exc}}||{{TI-5x/Keys/Alt|Prd}}||{{TI-5x/Keys/Alt|Ind}}
|-
|!5''x''
|{{TI-5x/Keys/Alt|Del}}||{{TI-5x/Keys/Alt|Eng}}||{{TI-5x/Keys/Alt|Fix}}||{{TI-5x/Keys/Alt|Int}}||{{TI-5x/Keys/Alt|&#124;x&#124;}}
|-
|!6''x''
|{{TI-5x/Keys/Alt|Pause}}||{{TI-5x/Keys/Alt|x&#61;t}}||{{TI-5x/Keys/Alt|Nop}}||{{TI-5x/Keys/Alt|Op}}||{{TI-5x/Keys/Alt|Deg}}
|-
|!7''x''
|{{TI-5x/Keys/Alt|Lbl}}||{{TI-5x/Keys/Alt|x≥t}}||{{TI-5x/Keys/Alt|∑x}}||{{TI-5x/Keys/Alt|mean(x)}}||{{TI-5x/Keys/Alt|Rad}}
|-
|!8''x''
|{{TI-5x/Keys/Alt|St flg}}||{{TI-5x/Keys/Alt|If flg}}||{{TI-5x/Keys/Alt|D.MS}}||{{TI-5x/Keys/Alt|π}}||{{TI-5x/Keys/Alt|Grad}}
|-
|!9''x''
|{{TI-5x/Keys/Alt|Write}}||{{TI-5x/Keys/Alt|Dsz}}||{{TI-5x/Keys/Alt|Adv}}||{{TI-5x/Keys/Alt|Prt}}||{{TI-5x/Keys/Alt|List}}
|----
Line 115:
But, because of the use of the 00 .. 09 codes for the {{TI-5x/Keys/White|&nbsp;0&nbsp;}} .. {{TI-5x/Keys/White|&nbsp;9&nbsp;}} keys, the codes 62-64, 72-74, 82-84 and 92 are available for other uses. So most of these are reallocated to represent ''op'' {{TI-5x/Keys/Alt|Ind}} sequences:
 
{| border="1" cellpadding="2" class="wikitable"
|----
|!&nbsp;||''x''2||''x''3||''x''4||
|-
|!6''x''
|{{TI-5x/Keys/Alt|Pgm}} {{TI-5x/Keys/Alt|Ind}}||{{TI-5x/Keys/Alt|Exc}} {{TI-5x/Keys/Alt|Ind}}||{{TI-5x/Keys/Alt|Prd}} {{TI-5x/Keys/Alt|Ind}}
|-
|!7''x''
|{{TI-5x/Keys/Brown|STO}} {{TI-5x/Keys/Alt|Ind}}||{{TI-5x/Keys/Brown|RCL}} {{TI-5x/Keys/Alt|Ind}}||{{TI-5x/Keys/Brown|SUM}} {{TI-5x/Keys/Alt|Ind}}
|-
|!8''x''
|&nbsp;||{{TI-5x/Keys/Brown|GTO}} {{TI-5x/Keys/Alt|Ind}}||{{TI-5x/Keys/Alt|Op}} {{TI-5x/Keys/Alt|Ind}}
|-
|!9''x''
|{{TI-5x/Keys/Brown|INV}} {{TI-5x/Keys/Brown|SBR}}||&nbsp;||&nbsp;
|----