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 |
---|---|---|

0 | 00 | (Space) |

1 | 01 | block graphic |

2 | 02 | block graphic |

3 | 03 | block graphic |

4 | 04 | block graphic |

5 | 05 | block graphic |

6 | 06 | block graphic |

7 | 07 | block graphic |

8 | 08 | block graphic |

9 | 09 | block graphic |

10 | 0A | block 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. | ||

11 | 0B | " |

12 | 0C | £ |

13 | 0D | $ |

14 | 0E | : |

15 | 0F | ? |

16 | 10 | ( |

17 | 11 | ) |

18 | 12 | > |

19 | 13 | < |

20 | 14 | = |

21 | 15 | + |

22 | 16 | - |

23 | 17 | * |

24 | 18 | / |

25 | 19 | ; |

26 | 1A | , |

27 | 1B | . |

28 | 1C | 0 |

29 | 1D | 1 |

30 | 1E | 2 |

31 | 1F | 3 |

32 | 20 | 4 |

33 | 21 | 5 |

34 | 22 | 6 |

35 | 23 | 7 |

36 | 24 | 8 |

37 | 25 | 9 |

38 | 26 | A |

39 | 27 | B |

40 | 28 | C |

41 | 29 | D |

42 | 2A | E |

43 | 2B | F |

44 | 2C | G |

45 | 2D | H |

46 | 2E | I |

47 | 2F | J |

48 | 30 | K |

49 | 31 | L |

50 | 32 | M |

51 | 33 | N |

52 | 34 | O |

53 | 35 | P |

54 | 36 | Q |

55 | 37 | R |

56 | 38 | S |

57 | 39 | T |

58 | 3A | U |

59 | 3B | V |

60 | 3C | W |

61 | 3D | X |

62 | 3E | Y |

63 | 3F | Z |

64 | 40 | RND |

65 | 41 | INKEY$ |

66 | 42 | PI |

67 | 43 | not used |

68 | 44 | not used |

69 | 45 | not used |

70 | 46 | not used |

71 | 47 | not used |

72 | 48 | not used |

73 | 49 | not used |

74 | 4A | not used |

75 | 4B | not used |

76 | 4C | not used |

77 | 4D | not used |

78 | 4E | not used |

79 | 4F | not used |

80 | 50 | not used |

81 | 51 | not used |

82 | 52 | not used |

83 | 53 | not used |

84 | 54 | not used |

85 | 55 | not used |

86 | 56 | not used |

87 | 57 | not used |

88 | 58 | not used |

89 | 59 | not used |

90 | 5A | not used |

91 | 5B | not used |

92 | 5C | not used |

93 | 5D | not used |

94 | 5E | not used |

95 | 5F | not used |

96 | 60 | not used |

97 | 61 | not used |

98 | 62 | not used |

99 | 63 | not used |

100 | 64 | not used |

101 | 65 | not used |

102 | 66 | not used |

103 | 67 | not used |

104 | 68 | not used |

105 | 69 | not used |

106 | 6A | not used |

107 | 6B | not used |

108 | 6C | not used |

109 | 6D | not used |

110 | 6E | not used |

111 | 6F | not used |

112 | 70 | cursor up |

113 | 71 | cursor down |

114 | 72 | cursor left |

115 | 73 | cursor right |

116 | 74 | GRAPHICSUsed 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. |

117 | 75 | EDIT |

118 | 76 | NEWLINE I.e. Enter/Return |

119 | 77 | RUBOUT I.e. Backspace/Delete |

120 | 78 | K/L mode |

121 | 79 | FUNCTION |

122 | 7A | not used |

123 | 7B | not used |

124 | 7C | not used |

125 | 7D | not used |

126 | 7E | numberIn 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. |

127 | 7F | cursor |

128 | 80 | block graphic |

129 | 81 | block graphic |

130 | 82 | block graphic |

131 | 83 | block graphic |

132 | 84 | block graphic |

133 | 85 | block graphic |

134 | 86 | block graphic |

135 | 87 | block graphic |

136 | 88 | block graphic |

137 | 89 | block graphic |

138 | 8A | block graphic |

See after code 10 for the forms of block graphics | ||

139 | 8B | inverse " |

140 | 8C | inverse £ |

141 | 8D | inverse $ |

142 | 8E | inverse : |

143 | 8F | inverse ? |

144 | 90 | inverse ( |

145 | 91 | inverse ) |

146 | 92 | inverse > |

147 | 93 | inverse < |

148 | 94 | inverse = |

149 | 95 | inverse + |

150 | 96 | inverse - |

151 | 97 | inverse * |

152 | 98 | inverse / |

153 | 99 | inverse ; |

154 | 9A | inverse , |

155 | 9B | inverse . |

156 | 9C | inverse 0 |

157 | 9D | inverse 1 |

158 | 9E | inverse 2 |

159 | 9F | inverse 3 |

160 | A0 | inverse 4 |

161 | A1 | inverse 5 |

162 | A2 | inverse 6 |

163 | A3 | inverse 7 |

164 | A4 | inverse 8 |

165 | A5 | inverse 9 |

166 | A6 | inverse A |

167 | A7 | inverse B |

168 | A8 | inverse C |

169 | A9 | inverse D |

170 | AA | inverse E |

171 | AB | inverse F |

172 | AC | inverse G |

173 | AD | inverse H |

174 | AE | inverse I |

175 | AF | inverse J |

176 | B0 | inverse K |

177 | B1 | inverse L |

178 | B2 | inverse M |

179 | B3 | inverse N |

180 | B4 | inverse O |

181 | B5 | inverse P |

182 | B6 | inverse Q |

183 | B7 | inverse R |

184 | B8 | inverse S |

185 | B9 | inverse T |

186 | BA | inverse U |

187 | BB | inverse V |

188 | BC | inverse W |

189 | BD | inverse X |

190 | BE | inverse Y |

191 | BF | inverse 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. | ||

192 | C0 | ""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` |

193 | C1 | AT |

194 | C2 | TAB |

195 | C3 | not used |

196 | C4 | CODE |

197 | C5 | VAL |

198 | C6 | LEN |

199 | C7 | SIN |

200 | C8 | COS |

201 | C9 | TAN |

202 | CA | ASN |

203 | CB | ACS |

204 | CC | ATN |

205 | CD | LN |

206 | CE | EXP |

207 | CF | INT |

208 | D0 | SQR |

209 | D1 | SGN |

210 | D2 | ABS |

211 | D3 | PEEK |

212 | D4 | USR |

213 | D5 | STR$ |

214 | D6 | CHR$ |

215 | D7 | NOT |

216 | D8 | ** The 'raise to a power' operator |

217 | D9 | OR |

218 | DA | AND |

219 | DB | <= |

220 | DC | >= |

221 | DD | <> |

The above three comparison operators are treated as single characters. Typing them as two separate characters produces a syntax error. | ||

222 | DE | THEN |

223 | DF | TO |

224 | E0 | STEP |

225 | E1 | LPRINT |

226 | E2 | LLIST |

227 | E3 | STOP |

228 | E4 | SLOW |

229 | E5 | FAST |

230 | E6 | NEW |

231 | E7 | SCROLL |

232 | E8 | CONT |

233 | E9 | DIM |

234 | EA | REM |

235 | EB | FOR |

236 | EC | GOTO |

237 | ED | GOSUB |

238 | EE | INPUT |

239 | EF | LOAD |

240 | F0 | LIST |

241 | F1 | LET |

242 | F2 | PAUSE |

243 | F3 | NEXT |

244 | F4 | POKE |

245 | F5 | PRINT |

246 | F6 | PLOT |

247 | F7 | RUN |

248 | F8 | SAVE |

249 | F9 | RAND |

250 | FA | IF |

251 | FB | CLS |

252 | FC | UNPLOT |

253 | FD | CLEAR |

254 | FE | RETURN |

255 | FF | COPY |

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. |