Sinclair Logo


Sinclair ZX81 Character Set



The Sinclair ZX81 had a completely non-standard character set and many normal ASCII characters, including lowercase letters, were absent.
The full ZX81 character set is listed below, with some annotation.

Decimal
Code
Hexadecimal
Code
Character
  000       (Space)
  101block graphic
  202block graphic
  303block graphic
  404block graphic
  505block graphic
  606block graphic
  707block graphic
  808block graphic
  909block graphic
 100Ablock graphic
The ZX81 has 16 'block graphic' characters which consist of a character square divided into four smaller squares, with every combination of none, one, two, three or four of the small squares 'filled-in', as shown in the top two rows below. These are used by the PLOT and UNPLOT commands to double the effective resolution of the display.
The six graphic characters in the bottom row are intended for drawing horizontal bar charts, with the 'chessboard' patterns giving a grey shade.
See ZX81 Block Graphics for more details.

Block graphic characters
 110B"
 120C£
 130D$
 140E:
 150F?
 1610(
 1711)
 1812>
 1913<
 2014=
 2115+
 2216-
 2317*
 2418/
 2519;
 261A,
 271B.
 281C0
 291D1
 301E2
 311F3
 32204
 33215
 34226
 35237
 36248
 37259
 3826A
 3927B
 4028C
 4129D
 422AE
 432BF
 442CG
 452DH
 462EI
 472FJ
 4830K
 4931L
 5032M
 5133N
 5234O
 5335P
 5436Q
 5537R
 5638S
 5739T
 583AU
 593BV
 603CW
 613DX
 623EY
 633FZ
 6440RND
 6541INKEY$
 6642PI
 6743not used
 6844not used
 6945not used
 7046not used
 7147not used
 7248not used
 7349not used
 744Anot used
 754Bnot used
 764Cnot used
 774Dnot used
 784Enot used
 794Fnot used
 8050not used
 8151not used
 8252not used
 8353not used
 8454not used
 8555not used
 8656not used
 8757not used
 8858not used
 8959not used
 905Anot used
 915Bnot used
 925Cnot used
 935Dnot used
 945Enot used
 955Fnot used
 9660not used
 9761not used
 9862not used
 9963not used
10064not used
10165not used
10266not used
10367not used
10468not used
10569not used
1066Anot used
1076Bnot used
1086Cnot used
1096Dnot used
1106Enot used
1116Fnot used
11270cursor up
11371cursor down
11472cursor left
11573cursor right
11674GRAPHICS
Used when entering program lines after the GRAPHICS key is pressed. Keys then either give the inverse video of their normal character, or a block graphics character.
11775EDIT
11876NEWLINE      I.e. Enter/Return
11977RUBOUT      I.e. Backspace/Delete
12078K/L mode
12179FUNCTION
1227Anot used
1237Bnot used
1247Cnot used
1257Dnot used
1267Enumber
In ZX81 BASIC program listings, the character form of numerical constants (e.g. 42) is followed, invisibly, by character 126 then the five-byte floating point binary equivalent of the number.
1277Fcursor
12880block graphic
12981block graphic
13082block graphic
13183block graphic
13284block graphic
13385block graphic
13486block graphic
13587block graphic
13688block graphic
13789block graphic
1388Ablock graphic
See after code 10 for the forms of block graphics
1398Binverse "
1408Cinverse £
1418Dinverse $
1428Einverse :
1438Finverse ?
14490inverse (
14591inverse )
14692inverse >
14793inverse <
14894inverse =
14995inverse +
15096inverse -
15197inverse *
15298inverse /
15399inverse ;
1549Ainverse ,
1559Binverse .
1569Cinverse 0
1579Dinverse 1
1589Einverse 2
1599Finverse 3
160A0inverse 4
161A1inverse 5
162A2inverse 6
163A3inverse 7
164A4inverse 8
165A5inverse 9
166A6inverse A
167A7inverse B
168A8inverse C
169A9inverse D
170AAinverse E
171ABinverse F
172ACinverse G
173ADinverse H
174AEinverse I
175AFinverse J
176B0inverse K
177B1inverse L
178B2inverse M
179B3inverse N
180B4inverse O
181B5inverse P
182B6inverse Q
183B7inverse R
184B8inverse S
185B9inverse T
186BAinverse U
187BBinverse V
188BCinverse W
189BDinverse X
190BEinverse Y
191BFinverse Z
The ZX81 normally displays black text on a white background. The inverse forms of characters reverse this, i.e. white characters in a black square.
192C0""
The double double quote character is used to put a double quote inside a string, which is delimited by normal double quotes. Although it appears as two double quotes in listings it is printed as just one double quote, so that
PRINT "ZX81 ""RAM"" pack"
would appear as
ZX81 "RAM" pack
193C1AT
194C2TAB
195C3not used
196C4CODE
197C5VAL
198C6LEN
199C7SIN
200C8COS
201C9TAN
202CAASN
203CBACS
204CCATN
205CDLN
206CEEXP
207CFINT
208D0SQR
209D1SGN
210D2ABS
211D3PEEK
212D4USR
213D5STR$
214D6CHR$
215D7NOT
216D8**     The 'raise to a power' operator
217D9OR
218DAAND
219DB<=
220DC>=
221DD<>
The above three comparison operators are treated as single characters. Typing them as two separate characters produces a syntax error.
222DETHEN
223DFTO
224E0STEP
225E1LPRINT
226E2LLIST
227E3STOP
228E4SLOW
229E5FAST
230E6NEW
231E7SCROLL
232E8CONT
233E9DIM
234EAREM
235EBFOR
236ECGOTO
237EDGOSUB
238EEINPUT
239EFLOAD
240F0LIST
241F1LET
242F2PAUSE
243F3NEXT
244F4POKE
245F5PRINT
246F6PLOT
247F7RUN
248F8SAVE
249F9RAND
250FAIF
251FBCLS
252FCUNPLOT
253FDCLEAR
254FERETURN
255FFCOPY
Most of the character codes from 193 to 255, plus 64 to 66, are the BASIC keywords. They are stored within the program as a single byte but in listings they are expanded to full words, including a space before and after as necessary to improve readability.
The idea of storing BASIC's words as a single byte was carried through from the Sinclair ZX80 and was used because of the very small memory capacity of the unexpanded ZX80 and ZX81. 'PRINT ' would normally take up six bytes whereas character 245 is only one byte.



Close window


Hosted by www.Geocities.ws

1