ZX81 character set

Last updated
Sinclair ZX81 character set
ZX81 characters 0x00-3F, 0x80-BF.png
The Sinclair ZX81 character set rendered in the system font.
Language(s) English with pseudographics
Created by Sinclair Research
Preceded by ZX80 character set
Succeeded by ZX Spectrum character set

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.

Contents

Printable characters

Screenshot of a ZX81 8K BASIC program that demonstrates all code points including BASIC keywords and nonprintable characters, rendered as question marks. ZX81 character set demo.png
Screenshot of a ZX81 8K BASIC program that demonstrates all code points including BASIC keywords and nonprintable characters, rendered as question marks.

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 precludes support for Latin lower case letters, and many symbols used widely in computing such as the exclamation point 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 CHR$ 192 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. [1]

Changes from the ZX80

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. [2]

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.

Character set

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.

ZX81 character set [1] [3]
0123456789ABCDEF
0x  SP   ZXSpectrum82.svg ZXSpectrum81.svg ZXSpectrum83.svg ZXSpectrum88.svg ZXSpectrum8a.svg ZXSpectrum89.svg ZXSpectrum8b.svg ZX80 character 0x09, ZX81 character 0x08.png ZX80 character 0x0A, ZX81 character 0x09.png ZX80 character 0x0B, ZX81 character 0x0A.png " [lower-alpha 1] £ $ : ?
1x ( ) > < = + - * / ; , . 0 1 2 3
2x 4 5 6 7 8 9 A B C D E F G H I J
3x K L M N O P Q R S T U V W X Y Z
4xRNDINKEY$PI
5x
6x
7x UP DOWN LEFT RIGHT graphics EDIT newline ruboutK/L
MODE
functionnumbercursor
8x ZXSpectrum8f.svg ZXSpectrum8d.svg ZXSpectrum8e.svg ZXSpectrum8c.svg ZXSpectrum87.svg ZXSpectrum85.svg ZXSpectrum86.svg ZXSpectrum84.svg ZX80 character 0x89, ZX81 character 0x88.png ZX80 character 0x8A, ZX81 character 0x89.png ZX80 character 0x8B, ZX81 character 0x8A.png "£$:?
9x()><=+-*/;,.0123
Ax456789ABCDEFGHIJ
BxKLMNOPQRSTUVWXYZ
Cx"" [lower-alpha 1] ATTABCODEVALLENSINCOSTANASNACSATNLNEXPINT
DxSQRSGNABSPEEKUSRSTR$CHR$NOT** [lower-alpha 2] ORAND<= [lower-alpha 3] >= [lower-alpha 4] <> [lower-alpha 5] THENTO
ExSTEPLPRINTLLISTSTOPSLOWFASTNEWSCROLLCONTDIMREMFORGOTOGOSUBINPUTLOAD
FxLISTLETPAUSENEXTPOKEPRINTPLOTRUNSAVERANDIFCLSUNPLOTCLEARRETURNCOPY
   Sinclair BASIC tokenizes keywords into single-byte code points.

See also

Notes

  1. 1 2 Code point 11 is the double-quote (") symbol when used in the video memory (called the display file). Code point 192, CHR$ 192, prints as the same character but shows as "" in BASIC listings and is used for including the literal " character in a string without conflict with the " string delimiter. [1]
  2. The raise to a power multi-character operator tokenized into a single-byte code point.
  3. The greater than or equal to multi-character operator tokenized into a single-byte code point.
  4. The less than or equal to multi-character operator tokenized into a single-byte code point.
  5. The not equal sign multi-character operator tokenized into a single-byte code point.

Related Research Articles

<span class="mw-page-title-main">Jupiter Ace</span> British home computer of the early 1980s

The Jupiter Ace by Jupiter Cantab was a British home computer released in 1982. The Ace differed from other microcomputers of the time in that its programming environment used Forth instead of the more popular BASIC. This difference, along with limited available software and poor character based graphic display, limited sales and the machine was not a success.

<span class="mw-page-title-main">ZX80</span> Popular and inexpensive home computer launched in 1980

The Sinclair ZX80 is a home computer launched on 29 January 1980 by Science of Cambridge Ltd.. It is notable for being one of the first computers available in the United Kingdom for less than a hundred pounds. It was available in kit form for £79.95, where purchasers had to assemble and solder it together, and as a ready-built version at £99.95.

<span class="mw-page-title-main">ZX81</span> Inexpensive home computer by Sinclair Research, 1981

The ZX81 is a home computer that was produced by Sinclair Research and manufactured in Dundee, Scotland, by Timex Corporation. It was launched in the United Kingdom in March 1981 as the successor to Sinclair's ZX80 and designed to be a low-cost introduction to home computing for the general public. It was hugely successful; more than 1.5 million units were sold. In the United States it was initially sold as the ZX-81 under licence by Timex. Timex later produced its own versions of the ZX81: the Timex Sinclair 1000 and Timex Sinclair 1500. Unauthorized ZX81 clones were produced in several countries.

Sinclair BASIC is a dialect of the programming language BASIC used in the 8-bit home computers from Sinclair Research, Timex Sinclair and Amstrad. The Sinclair BASIC interpreter was written by Nine Tiles Networks Ltd.

<span class="mw-page-title-main">Timex Sinclair 2068</span> Home computer released in 1983

The Timex Sinclair 2068, released in November 1983, was Timex Sinclair's third and last home computer for the United States market. It was also marketed in Canada, Argentina, Portugal and Poland, as Timex Computer 2068.

<span class="mw-page-title-main">PETSCII</span> Character encoding on Commodore computers

PETSCII, also known as CBM ASCII, is the character set used in Commodore Business Machines' 8-bit home computers.

<span class="mw-page-title-main">ATASCII</span> Character encoding used by the Atari 8-bit family of home computers

The ATASCII character set, from ATARI Standard Code for Information Interchange, alternatively ATARI ASCII, is a character encoding used in the Atari 8-bit family of home computers. ATASCII is based on ASCII, but is not fully compatible with it.

<span class="mw-page-title-main">Code page 437</span> Character set of the original IBM PC

Code page 437 is the character set of the original IBM PC. It is also known as CP437, OEM-US, OEM 437, PC-8, or DOS Latin US. The set includes all printable ASCII characters as well as some accented letters (diacritics), Greek letters, icons, and line-drawing symbols. It is sometimes referred to as the "OEM font" or "high ASCII", or as "extended ASCII".

<i>3D Monster Maze</i> 1981 video game

3D Monster Maze is a survival horror computer game developed from an idea by J.K. Greye and programmed by Malcolm Evans and released in 1981 for the Sinclair ZX81 platform with the 16 KB memory expansion. The game was initially released by J. K. Greye Software in December 1981 and re-released in 1982 by Evans' own startup, New Generation Software. Rendered using low-resolution character block "graphics", it was one of the first 3D games for a home computer, and one of the first games incorporating typical elements of the genre that would later be termed survival horror.

<span class="mw-page-title-main">Box-drawing character</span> Unicode block group

Box-drawing characters, also known as line-drawing characters, are a form of semigraphics widely used in text user interfaces to draw various geometric frames and boxes. These characters are characterized by being designed to be connected horizontally and/or vertically with adjacent characters, which requires proper alignment. Box-drawing characters therefore typically only work well with monospaced fonts.

<span class="mw-page-title-main">ZX Spectrum graphic modes</span> Graphic modes of the ZX Spectrum computer

The original ZX Spectrum computer produces a one bit per pixel, bitmapped colour graphics video output. A composite video signal is generated through an RF modulator, and was designed for use with contemporary 1980s television sets.

Super Expander 64 is a cartridge-based extension to the built in BASIC interpreter of Commodore 64 home computer. It was published by Commodore Business Machines in 1983. The built-in BASIC of the C64 was adapted from the PET and VIC 20, and the language does not have direct support for the system's sound and graphics hardware. Super Expander 64 adds functions for drawing graphics, using sprites, reading joysticks, playing audio, and other features.

<span class="mw-page-title-main">Universal Character Set characters</span> Complete list of the characters available on most computers

The Unicode Consortium and the ISO/IEC JTC 1/SC 2/WG 2 jointly collaborate on the list of the characters in the Universal Coded Character Set. The Universal Coded Character Set, most commonly called the Universal Character Set, is an international standard to map characters, discrete symbols used in natural language, mathematics, music, and other domains, to unique machine-readable data values. By creating this mapping, the UCS enables computer software vendors to interoperate, and transmit—interchange—UCS-encoded text strings from one to another. Because it is a universal map, it can be used to represent multiple languages at the same time. This avoids the confusion of using multiple legacy character encodings, which can result in the same sequence of codes having multiple interpretations depending on the character encoding in use, resulting in mojibake if the wrong one is chosen.

Specials is a short Unicode block of characters allocated at the very end of the Basic Multilingual Plane, at U+FFF0–FFFF. Of these 16 code points, five have been assigned since Unicode 3.0:

<span class="mw-page-title-main">GNU Unifont</span> Duospaced bitmap font

GNU Unifont is a free Unicode bitmap font created by Roman Czyborra. The main Unifont covers all of the Basic Multilingual Plane (BMP). The "upper" companion covers significant parts of the Supplementary Multilingual Plane (SMP). The "Unifont JP" companion contains Japanese kanji present in the JIS X 0213 character set.

<span class="mw-page-title-main">Extended ASCII</span> Nickname for 8-bit ASCII-derived character sets

Extended ASCII is a repertoire of character encodings that include the original 96 ASCII character set, plus up to 128 additional characters. There is no formal definition of "extended ASCII", and even use of the term is sometimes criticized, because it can be mistakenly interpreted to mean that the American National Standards Institute (ANSI) had updated its ANSI X3.4-1986 standard to include more characters, or that the term identifies a single unambiguous encoding, neither of which is the case.

<span class="mw-page-title-main">ZX Spectrum character set</span>

The ZX Spectrum character set is the variant of ASCII used in the ZX Spectrum family computers. It is based on ASCII-1967 but the characters ^, ` and DEL are replaced with ↑, £ and ©. It also differs in its use of the C0 control codes other than the common BS and CR, and it makes use of the 128 high-bit characters beyond the ASCII range. The ZX Spectrum's main set of printable characters and system font are also used by the Jupiter Ace computer.

<span class="mw-page-title-main">Semigraphics</span> Method used in early text mode video hardware to emulate raster graphics

Text-based semigraphics, pseudographics, or character graphics is a primitive method used in early text mode video hardware to emulate raster graphics without having to implement the logic for such a display mode.

<span class="mw-page-title-main">ZX80 character set</span> Character set

The ZX80 character set is the character encoding used by the Sinclair Research ZX80 microcomputer with its original 4K BASIC ROM. 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 successor ZX81.

References

  1. 1 2 3 Vickers, Steven (1981). Sinclair ZX81 BASIC Programming. Sinclair Research Ltd.
  2. "8K BASIC ROM UPGRADE".
  3. Wearmouth, Geoff. "An Assembly Listing of the Operating System of the ZX81 ROM". Archived from the original on August 15, 2015.