Kody klawiszy
From Atariki
Wersja z dnia 11:56, 23 kwi 2010 Mono (Dyskusja | wkład) (spacja i .) ← Previous diff |
Wersja z dnia 14:46, 26 kwi 2010 KMK (Dyskusja | wkład) (+ kody hex) Next diff → |
||
Linia 2: | Linia 2: | ||
<table border=1 cellpadding=5> | <table border=1 cellpadding=5> | ||
- | <tr><td><b>Kod (dec)</b></td><td><b>Klawisz</b></td></tr> | + | <tr><td><b>Kod dec</b></td><td><b>Kod hex</b></td><td><b>Klawisz</b></td></tr> |
- | <tr><td>0</td><td>L</td></tr> | + | <tr><td>0</td><td>$00</td><td>L</td></tr> |
- | <tr><td>1</td><td>J</td></tr> | + | <tr><td>1</td><td>$01</td><td>J</td></tr> |
- | <tr><td>2</td><td>;</td></tr> | + | <tr><td>2</td><td>$02</td><td>;</td></tr> |
- | <tr><td>3</td><td></td></tr> | + | <tr><td>3</td><td>$03</td><td></td></tr> |
- | <tr><td>4</td><td></td></tr> | + | <tr><td>4</td><td>$04</td><td></td></tr> |
- | <tr><td>5</td><td>K</td></tr> | + | <tr><td>5</td><td>$05</td><td>K</td></tr> |
- | <tr><td>6</td><td>+</td></tr> | + | <tr><td>6</td><td>$06</td><td>+</td></tr> |
- | <tr><td>7</td><td>*</td></tr> | + | <tr><td>7</td><td>$07</td><td>*</td></tr> |
- | <tr><td>8</td><td>O</td></tr> | + | <tr><td>8</td><td>$08</td><td>O</td></tr> |
- | <tr><td>9</td><td></td></tr> | + | <tr><td>9</td><td>$09</td><td></td></tr> |
- | <tr><td>10</td><td>P</td></tr> | + | <tr><td>10</td><td>$0a</td><td>P</td></tr> |
- | <tr><td>11</td><td>U</td></tr> | + | <tr><td>11</td><td>$0b</td><td>U</td></tr> |
- | <tr><td>12</td><td>RETURN</td></tr> | + | <tr><td>12</td><td>$0c</td><td>RETURN</td></tr> |
- | <tr><td>13</td><td>I</td></tr> | + | <tr><td>13</td><td>$0d</td><td>I</td></tr> |
- | <tr><td>14</td><td>-</td></tr> | + | <tr><td>14</td><td>$0e</td><td>-</td></tr> |
- | <tr><td>15</td><td>=</td></tr> | + | <tr><td>15</td><td>$0f</td><td>=</td></tr> |
- | <tr><td>16</td><td>V</td></tr> | + | <tr><td>16</td><td>$10</td><td>V</td></tr> |
- | <tr><td>17</td><td>HELP</td></tr> | + | <tr><td>17</td><td>$11</td><td>HELP</td></tr> |
- | <tr><td>18</td><td>C</td></tr> | + | <tr><td>18</td><td>$12</td><td>C</td></tr> |
- | <tr><td>19</td><td></td></tr> | + | <tr><td>19</td><td>$13</td><td></td></tr> |
- | <tr><td>20</td><td></td></tr> | + | <tr><td>20</td><td>$14</td><td></td></tr> |
- | <tr><td>21</td><td>B</td></tr> | + | <tr><td>21</td><td>$15</td><td>B</td></tr> |
- | <tr><td>22</td><td>X</td></tr> | + | <tr><td>22</td><td>$16</td><td>X</td></tr> |
- | <tr><td>23</td><td>Z</td></tr> | + | <tr><td>23</td><td>$17</td><td>Z</td></tr> |
- | <tr><td>24</td><td>4</td></tr> | + | <tr><td>24</td><td>$18</td><td>4</td></tr> |
- | <tr><td>25</td><td></td></tr> | + | <tr><td>25</td><td>$19</td><td></td></tr> |
- | <tr><td>26</td><td>3</td></tr> | + | <tr><td>26</td><td>$1a</td><td>3</td></tr> |
- | <tr><td>27</td><td>6</td></tr> | + | <tr><td>27</td><td>$1b</td><td>6</td></tr> |
- | <tr><td>28</td><td>ESC</td></tr> | + | <tr><td>28</td><td>$1c</td><td>ESC</td></tr> |
- | <tr><td>29</td><td>5</td></tr> | + | <tr><td>29</td><td>$1d</td><td>5</td></tr> |
- | <tr><td>30</td><td>2</td></tr> | + | <tr><td>30</td><td>$1e</td><td>2</td></tr> |
- | <tr><td>31</td><td>1</td></tr> | + | <tr><td>31</td><td>$1f</td><td>1</td></tr> |
- | <tr><td>32</td><td>,</td></tr> | + | <tr><td>32</td><td>$20</td><td>,</td></tr> |
- | <tr><td>33</td><td>SPACE</td></tr> | + | <tr><td>33</td><td>$21</td><td>SPACE</td></tr> |
- | <tr><td>34</td><td>.</td></tr> | + | <tr><td>34</td><td>$22</td><td>.</td></tr> |
- | <tr><td>35</td><td>N</td></tr> | + | <tr><td>35</td><td>$23</td><td>N</td></tr> |
- | <tr><td>36</td><td></td></tr> | + | <tr><td>36</td><td>$24</td><td></td></tr> |
- | <tr><td>37</td><td>M</td></tr> | + | <tr><td>37</td><td>$25</td><td>M</td></tr> |
- | <tr><td>38</td><td>/</td></tr> | + | <tr><td>38</td><td>$26</td><td>/</td></tr> |
- | <tr><td>39</td><td>LOGO</td></tr> | + | <tr><td>39</td><td>$27</td><td>LOGO</td></tr> |
- | <tr><td>40</td><td>R</td></tr> | + | <tr><td>40</td><td>$28</td><td>R</td></tr> |
- | <tr><td>41</td><td></td></tr> | + | <tr><td>41</td><td>$29</td><td></td></tr> |
- | <tr><td>42</td><td>E</td></tr> | + | <tr><td>42</td><td>$2a</td><td>E</td></tr> |
- | <tr><td>43</td><td>Y</td></tr> | + | <tr><td>43</td><td>$2b</td><td>Y</td></tr> |
- | <tr><td>44</td><td>TAB</td></tr> | + | <tr><td>44</td><td>$2c</td><td>TAB</td></tr> |
- | <tr><td>45</td><td>T</td></tr> | + | <tr><td>45</td><td>$2d</td><td>T</td></tr> |
- | <tr><td>46</td><td>W</td></tr> | + | <tr><td>46</td><td>$2e</td><td>W</td></tr> |
- | <tr><td>47</td><td>Q</td></tr> | + | <tr><td>47</td><td>$2f</td><td>Q</td></tr> |
- | <tr><td>48</td><td>9</td></tr> | + | <tr><td>48</td><td>$30</td><td>9</td></tr> |
- | <tr><td>49</td><td></td></tr> | + | <tr><td>49</td><td>$31</td><td></td></tr> |
- | <tr><td>50</td><td>0</td></tr> | + | <tr><td>50</td><td>$32</td><td>0</td></tr> |
- | <tr><td>51</td><td>7</td></tr> | + | <tr><td>51</td><td>$33</td><td>7</td></tr> |
- | <tr><td>52</td><td>BACKSPACE</td></tr> | + | <tr><td>52</td><td>$34</td><td>BACKSPACE</td></tr> |
- | <tr><td>53</td><td>8</td></tr> | + | <tr><td>53</td><td>$35</td><td>8</td></tr> |
- | <tr><td>54</td><td><</td></tr> | + | <tr><td>54</td><td>$36</td><td><</td></tr> |
- | <tr><td>55</td><td>></td></tr> | + | <tr><td>55</td><td>$37</td><td>></td></tr> |
- | <tr><td>56</td><td>F</td></tr> | + | <tr><td>56</td><td>$38</td><td>F</td></tr> |
- | <tr><td>57</td><td>H</td></tr> | + | <tr><td>57</td><td>$39</td><td>H</td></tr> |
- | <tr><td>58</td><td>D</td></tr> | + | <tr><td>58</td><td>$3a</td><td>D</td></tr> |
- | <tr><td>59</td><td></td></tr> | + | <tr><td>59</td><td>$3b</td><td></td></tr> |
- | <tr><td>60</td><td>CAPS</td></tr> | + | <tr><td>60</td><td>$3c</td><td>CAPS</td></tr> |
- | <tr><td>61</td><td>G</td></tr> | + | <tr><td>61</td><td>$3d</td><td>G</td></tr> |
- | <tr><td>62</td><td>S</td></tr> | + | <tr><td>62</td><td>$3e</td><td>S</td></tr> |
- | <tr><td>63</td><td>A</td></tr> | + | <tr><td>63</td><td>$3f</td><td>A</td></tr> |
</table> | </table> | ||
Wersja z dnia 14:46, 26 kwi 2010
"Surowe" kody klawiszy generowane przez klawiaturę. W dalszej fazie obróbki system operacyjny przetwarza większość z nich na kody ATASCII.
Kod dec | Kod hex | Klawisz |
0 | $00 | L |
1 | $01 | J |
2 | $02 | ; |
3 | $03 | |
4 | $04 | |
5 | $05 | K |
6 | $06 | + |
7 | $07 | * |
8 | $08 | O |
9 | $09 | |
10 | $0a | P |
11 | $0b | U |
12 | $0c | RETURN |
13 | $0d | I |
14 | $0e | - |
15 | $0f | = |
16 | $10 | V |
17 | $11 | HELP |
18 | $12 | C |
19 | $13 | |
20 | $14 | |
21 | $15 | B |
22 | $16 | X |
23 | $17 | Z |
24 | $18 | 4 |
25 | $19 | |
26 | $1a | 3 |
27 | $1b | 6 |
28 | $1c | ESC |
29 | $1d | 5 |
30 | $1e | 2 |
31 | $1f | 1 |
32 | $20 | , |
33 | $21 | SPACE |
34 | $22 | . |
35 | $23 | N |
36 | $24 | |
37 | $25 | M |
38 | $26 | / |
39 | $27 | LOGO |
40 | $28 | R |
41 | $29 | |
42 | $2a | E |
43 | $2b | Y |
44 | $2c | TAB |
45 | $2d | T |
46 | $2e | W |
47 | $2f | Q |
48 | $30 | 9 |
49 | $31 | |
50 | $32 | 0 |
51 | $33 | 7 |
52 | $34 | BACKSPACE |
53 | $35 | 8 |
54 | $36 | < |
55 | $37 | > |
56 | $38 | F |
57 | $39 | H |
58 | $3a | D |
59 | $3b | |
60 | $3c | CAPS |
61 | $3d | G |
62 | $3e | S |
63 | $3f | A |
Wciśnięcie odpowiedniego klawisza z klawiszem SHIFT zwiększa kod o 64 ($40), a z klawiszem CONTROL o 128 ($80). Niektóre klawisze są niedostępne w kombinacji z SHIFT+CONTROL wciśniętymi równocześnie.
System operacyjny bada wciśnięcie klawisza HELP i w zależności od tego ustawia flagę HLPFLG (732, $02DC; zapisywany jest tam kod kombinacji klawisza HELP z ewentualnymi klawiszami SHIFT lub CONTROL).
Klawisze F1..F4 są dostępne w modelu 1200XL.
Układ sprzętowy rozpoznaje wciśnięcie kombinacji klawiszy SHIFT+CONTROL+A, aczkolwiek system operacyjny rezerwuje jej kod (255, $FF) dla oznaczenia w rejestrze KBCODES (764, $02FC) stanu, kiedy żaden klawisz nie został wciśnięty. W konsekwencji wciśnięcie tej kombinacji może być wykrywane jedynie bezpośrednio w rejestrze KBCODE (53769, $D209) lub przez własny handler przerwania klawiatury wektoryzowany przez VKEY (520, $0208). Praktycznie użycie tej kombinacji może służyć do "oszukania" systemu i anulowania informacji o ostatnio wciśniętej kombinacji klawiszy.
Wciśnięcie klawisza BREAK powoduje wygenerowanie przerwania IRQ ze skasowanym bitem B w rejestrze stanu procesora (analogiczne przerwanie generowane jest za pomocą rozkazu procesora BRK, lecz bit B jest wtedy ustawiony). Systemowa procedura obsługi przerwania klawisza BREAK wektoryzowana przez VBRKKEY (566=$236) ustawia bit 7 w rejestrze IRQSTATS (17=$11). Przerwanie rozkazu BRK jest wektoryzowane przez VBREAK (518=$206).
Dodatkowa informacja o wciśnięciu bądź zwolnieniu klawisza SHIFT lub dowolnego innego klawisza (prócz BREAK, CONTROL i klawiszy konsoli) może być sprawdzana w rejestrze SKSTAT (53775, $D20F).