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

Printable characters

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. The remaining code points 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 or the at sign.
There are 11 block graphics characters, counting code point 0 which also doubles as space. Together with the 11 inverse video versions these 22 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, or into 1×2 black, white or dithered gray wide block pixels for a 32×48 resolution. The 2×2 versions of these are also present in the Block Elements Unicode block.
Code point 1 is the double-quote character when used in the display file, but uniquely to the ZX80 it is used internally as the string terminator character so the BASIC function CHR$ returns a null string; CHR$ translates to the printable " character.

Changes in the ZX81

The 8K BASIC ROM of the follow-up ZX81 model was also available as an upgrade for the ZX80, replacing its integer-only 4K BASIC ROM. It introduced the modified ZX81 character set which has 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. There are also changes to the control characters and code point 1 is no longer an unprintable string terminator.
In the later Sinclair 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.

System font

The ZX80 system font uses an 8×8 pixel-per-character grid where most glyphs fit in 7×6 pixels leaving one pixel horizontal space between them. This font was modified in the ZX81's ROM to slightly narrower 6×6 pixel glyphs with two pixels horizontal space between them, which improved the look of single inverted characters by showing inverted pixels on both sides. 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.

Character set