Content deleted Content added
m convert special characters (via WP:JWB) |
|||
Line 16:
|-
!3''x''
|{{TI-5x/Keys/Brown|LRN}}||{{TI-5x/Keys/Brown|x⇌t}}||{{TI-5x/Keys/Brown|x
|-
!4''x''
Line 34:
|-
!9''x''
|{{TI-5x/Keys/Brown|R/S}}||{{TI-5x/Keys/White| 0 }}||{{TI-5x/Keys/White| . }}||{{TI-5x/Keys/White|+/-}}||{{TI-5x/Keys/Yellow|
|----
|}
Line 58:
To use this program, you would enter the number ''n'' to be operated on, press {{TI-5x/Keys/Brown|RST}} to ensure the current program ___location was 000, then {{TI-5x/Keys/Brown|R/S}} to start execution. When the program stops (which should happen quite quickly for such a simple program), the display will be showing the number ''n'' + 2.
You can see that the codes 85, 95 and 91 correspond to the positions of the keys labelled {{TI-5x/Keys/Yellow| + }}, {{TI-5x/Keys/Yellow|
=== Context-Dependent Interpretations ===
These TI calculators allowed for addressing up to 100 data memory locations, numbered 00 to 99 (some models had a lower limit than this). A keystroke sequence like {{TI-5x/Keys/Brown|STO}} {{TI-5x/Keys/White| 4 }} {{TI-5x/Keys/White| 2 }} (store the currently-displayed number into memory 42) would be encoded as 42 42. In this case the first 42 is the key code for the {{TI-5x/Keys/Brown|STO}} key, but the second 42 is not a key code, but a memory register number. The calculator knows to interpret it as such because
Program addresses were 3 digits, potentially allowing programs to consist of up to 1000 steps, numbered 000 to 999 (though in fact none of the models produced allowed for this maximum). A branch instruction, for example {{TI-5x/Keys/Brown|GTO}} {{TI-5x/Keys/White| 3 }} {{TI-5x/Keys/White| 4 }} {{TI-5x/Keys/White| 5 }} (unconditional branch to ___location 345) would be encoded as 61 03 45. In this case the hundreds digit of the branch destination is in the units digit of the second instruction byte (after the opcode), with a zero tens digit; and the remaining digits are in the third instruction byte.
Line 72:
=== Modifier Keys ===
Most of the keys had multiple functions, depending on whether {{TI-5x/Keys/Brown|INV}} or {{TI-5x/Keys/Yellow|2nd}} had been pressed beforehand. {{TI-5x/Keys/Brown|INV}} invoked the
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:
Line 81:
|-
!1''x''
|{{TI-5x/Keys/Alt| A
|-
!2''x''
Line 93:
|-
!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|
|-
!6''x''
|{{TI-5x/Keys/Alt|Pause}}||{{TI-5x/Keys/Alt|x
|-
!7''x''
|{{TI-5x/Keys/Alt|Lbl}}||{{TI-5x/Keys/Alt|x≥t}}||{{TI-5x/Keys/Alt|
|-
!8''x''
|