The ZX81 character set is the character encoding used by the Sinclair Research ZX81 family of microcomputers including the Timex Sinclair 1000 and Timex Sinclair 1500. The encoding uses one byte per character for 256 code points. It has no relationship with previously established ones like ASCII or EBCDIC, but it is related though not identical to the character set of the predecessor ZX80.
The character set has 64 unique glyphs present at code points 0âÂÂ63. With the most significant bit set the character is generated in inverse video; corresponding to code points 128âÂÂ191. These 128 values are the only displayable ones allowed in the video memory (known as the display file). The remaining code points (64âÂÂ127 and 192âÂÂ255) are used as control characters such as 118 for newline or, uniquely to Sinclair BASIC, for keywords, while some are unused.
The small effective range of only 64 unique glyphs has led to the exclusion of many characters, including Latin lower case letters and symbols used widely in computing such as the exclamation mark and the at sign. The lack of an apostrophe led some software authors to use a comma instead.
There are 11 block graphics characters, counting code point 0 which also doubles as space. The first 8 of these together with their 8 inverse video versions (16 code points) provide every combination of the character cell divided into 2ÃÂ2 black-and-white block pixels for low-resolution 64ÃÂ48 pixel graphics. These 2ÃÂ2 blocks are present in the Block Elements Unicode block. An additional 3 characters provide a cell divided into 1ÃÂ2 black, white or dithered gray wide block pixels. These, in combination with their inverse video versions and some of the previous 2ÃÂ2 blocks provides for a 32ÃÂ48 resolution with 3 levels (white, dithered gray, black). The basic 11 characters plus their inverse video versions, makes for 22 block graphics characters in total. The dithered characters (of which there are 6) are also available in Unicode (mostly in the Symbols for Legacy Computing block), but only in Unicode versions 13.0 and newer, available from 2020 onwards.
Code point 11 is the double-quote (") symbol when used in the display file. The BASIC function <code>CHR$ 192</code> prints as the same character but is shown as "" in BASIC source listings; it is used for including the literal " character in a string without conflict with the " string delimiter.
The character set in the ZX81 was derived from the ZX80 character set. They have mostly the same code points, e.g. for A-Z and 0-9, but the code points are different for the block graphics characters, the symbols ", -, +, *, /, =, >, <, and the BASIC keyword tokens (with many new added). There are also changes to the control characters. Code point 1 is no longer an unprintable string terminator. The ZX81 8K BASIC ROM was also available as an upgrade for the ZX80, replacing its integer-only 4K BASIC ROM.
The ZX81 system font uses an 8ÃÂ8 pixel-per-character grid where most glyphs fit in 6ÃÂ6 pixels leaving two pixels horizontal and vertical space between rows and columns. The ZX80's ROM which had slightly wider 7ÃÂ6 pixel glyphs with only one pixel horizontal space between them. Some glyphs also received a different design in the ZX81 system font, noticeable on the *, the slashed and less rounded 0, and the less rounded $, C, G and J.
In the later ZX Spectrum the entire character encoding was replaced with the ZX Spectrum character set, which is a derivative of ASCII and includes lower case letters and more.
The following table shows the ZX81 character set. Each character is shown with a potential Unicode equivalent. Space and control characters are represented by the abbreviations for their names.