-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathappendix-screencodes.tex
153 lines (144 loc) · 5.37 KB
/
appendix-screencodes.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
\chapter{Screen Codes}
\section{Screen Codes}
\label{appendix:screencodes}
A text character is represented in screen memory by a screen code. There are 256 possible screen codes, each referring to an image in the current character set.
A complete character set contains two groups of 256 images, one for the uppercase mode and one for the lowercase mode, for a total of 512 images. Only one mode can be displayed at a time. The built-in character sets use the first 128 characters of each group for normal characters and the next 128 for reversed versions of the same characters.
In BASIC, the {\bf T@\&()} special array provides access to the characters on the screen using column and row indexes. The values in this special array are screen codes. The {\bf FONT} command changes between the built-in character sets. The {\bf CHARDEF} command changes the image associated with a screen code.
\underline{Note}: Screen codes are different to PETSCII codes. PETSCII codes are used to store, transmit, and receive textual data, and control the way strings are printed to the screen. When a PETSCII character is printed to the screen, the corresponding screen code is written to screen memory. For a list of PETSCII codes, see appendix \vref{appendix:asciicodes}.
The following table lists the screen codes. When a code produces a different character based on the mode, the character is listed as ``uppercase / lowercase.''
\index{Keyboard!Screen Codes}
\begin{adjustwidth}{}{-2cm}
\begin{multicols}{4}
\begin{description}[align=left,labelwidth=0.2cm]
\item [0] @
\item [1] A / a
\item [2] B / b
\item [3] C / c
\item [4] D / d
\item [5] E / e
\item [6] F / f
\item [7] G / g
\item [8] H / h
\item [9] I / i
\item [10] J / j
\item [11] K / k
\item [12] L / l
\item [13] M / m
\item [14] N / n
\item [15] O / o
\item [16] P / p
\item [17] Q / q
\item [18] R / r
\item [19] S / s
\item [20] T / t
\item [21] U / u
\item [22] V / v
\item [23] W / w
\item [24] X / x
\item [25] Y / y
\item [26] Z / z
\item [27] [
\item [28] \pounds
\item [29] ]
\item [30] $\uparrow$
\item [31] $\leftarrow$
\item [32] space
\item [33] !
\item [34] "
\item [35] \#
\item [36] \$
\item [37] \%
\item [38] \&
\item [39] '
\item [40] (
\item [41] )
\item [42] *
\item [43] +
\item [44] ,
\item [45] -
\item [46] .
\item [47] /
\item [48] 0
\item [49] 1
\item [50] 2
\item [51] 3
\item [52] 4
\item [53] 5
\item [54] 6
\item [55] 7
\item [56] 8
\item [57] 9
\item [58] :
\item [59] ;
\item [60] <
\item [61] =
\item [62] >
\item [63] ?
\item [64] \graphicsymbol{C}
\item [65] \graphicsymbol{A} / A
\item [66] \graphicsymbol{B} / B
\item [67] \graphicsymbol{C} / C
\item [68] \graphicsymbol{D} / D
\item [69] \graphicsymbol{E} / E
\item [70] \graphicsymbol{F} / F
\item [71] \graphicsymbol{G} / G
\item [72] \graphicsymbol{H} / H
\item [73] \graphicsymbol{I} / I
\item [74] \graphicsymbol{J} / J
\item [75] \graphicsymbol{K} / K
\item [76] \graphicsymbol{L} / L
\item [77] \graphicsymbol{M} / M
\item [78] \graphicsymbol{N} / N
\item [79] \graphicsymbol{O} / O
\item [80] \graphicsymbol{P} / P
\item [81] \graphicsymbol{Q} / Q
\item [82] \graphicsymbol{R} / R
\item [83] \graphicsymbol{S} / S
\item [84] \graphicsymbol{T} / T
\item [85] \graphicsymbol{U} / U
\item [86] \graphicsymbol{V} / V
\item [87] \graphicsymbol{W} / W
\item [88] \graphicsymbol{X} / X
\item [89] \graphicsymbol{Y} / Y
\item [90] \graphicsymbol{Z} / Z
\item [91] \graphicsymbol{+}
\item [92] \graphicsymbol{-}
\item [93] \graphicsymbol{B}
\item [94] \graphicsymbol{3} / \graphicsymbol{>} % pi and inverted checker
\item [95] \graphicsymbol{]} / \graphicsymbol{:} % upper right triangle and back slashes
\item [96] space
\item [97] \graphicsymbol{j}
\item [98] \graphicsymbol{i}
\item [99] \graphicsymbol{t}
\item [100] \graphicsymbol{[}
\item [101] \graphicsymbol{g}
\item [102] \graphicsymbol{<}
\item [103] \graphicsymbol{m}
\item [104] \graphicsymbol{/}
\item [105] \graphicsymbol{?} / \graphicsymbol{)} % upper-left triangle and forward slashes
\item [106] \graphicsymbol{n}
\item [107] \graphicsymbol{q}
\item [108] \graphicsymbol{d}
\item [109] \graphicsymbol{z}
\item [110] \graphicsymbol{s}
\item [111] \graphicsymbol{p}
\item [112] \graphicsymbol{a}
\item [113] \graphicsymbol{e}
\item [114] \graphicsymbol{r}
\item [115] \graphicsymbol{w}
\item [116] \graphicsymbol{h}
\item [117] \graphicsymbol{j}
\item [118] \graphicsymbol{l}
\item [119] \graphicsymbol{y}
\item [120] \graphicsymbol{u}
\item [121] \graphicsymbol{p}
\item [122] \graphicsymbol{\{} / \graphicsymbol{8} % lower right square edge and tick symbol
\item [123] \graphicsymbol{f}
\item [124] \graphicsymbol{c}
\item [125] \graphicsymbol{x}
\item [126] \graphicsymbol{v}
\item [127] \graphicsymbol{b}
\end{description}
\end{multicols}
\end{adjustwidth}
\underline{Note}: In the built-in character sets, codes 128-255 are reversed versions of 0-127.