ZX80 character set

Last updated
Sinclair ZX80 character set
ZX80 characters 0x00-3F, 0x80-BF.png
The Sinclair ZX80 character set rendered in the system font.
Language(s) English with pseudographics
Created by Sinclair Research
Succeeded by ZX81 character set
Other related encoding(s) ZX Spectrum 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.

Contents

Printable characters

Screenshot of a ZX80 4K BASIC program that demonstrates all code points including BASIC keywords and nonprintable characters, the latter rendered as question marks except CHR$(1) rendered as a null string. Therefore the top line covers the 33 code points 0-32, the following 5 lines cover 32 each, and the last lines with keywords cover yet fewer. ZX80 character set demo.png
Screenshot of a ZX80 4K BASIC program that demonstrates all code points including BASIC keywords and nonprintable characters, the latter rendered as question marks except CHR$(1) rendered as a null string. Therefore the top line covers the 33 code points 0–32, the following 5 lines cover 32 each, and the last lines with keywords cover yet fewer.

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 or Sinclair BASIC 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 [1] so the BASIC function CHR$(1) returns a null string; [2] CHR$(212) translates to the printable " character. [3]

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. [4] 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 (with many new added). There are also changes to the control characters and code point 1 is no longer an unprintable string terminator.

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.

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

The following table shows the ZX80 character set. Each character is shown with a potential Unicode equivalent. Space and control characters are represented by the abbreviations for their names.

ZX80 character set [1] [3] [lower-alpha 1]
0123456789ABCDEF
0x  SP   " [lower-alpha 2] ZXSpectrum8a.svg ZXSpectrum8c.svg ZXSpectrum82.svg ZXSpectrum81.svg ZXSpectrum88.svg ZXSpectrum84.svg ZXSpectrum89.svg ZX80 character 0x09, ZX81 character 0x08.png [lower-alpha 3] ZX80 character 0x0A, ZX81 character 0x09.png ZX80 character 0x0B, ZX81 character 0x0A.png £ $ : ?
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
4x
5x
6x
7x UP DOWN LEFT RIGHT HOME EDIT NEL RUBOUT
8x ZXSpectrum8f.svg " ZXSpectrum85.svg ZXSpectrum83.svg ZXSpectrum8d.svg ZXSpectrum8e.svg ZXSpectrum87.svg ZXSpectrum8b.svg ZXSpectrum86.svg ZX80 character 0x89, ZX81 character 0x88.png [lower-alpha 3] ZX80 character 0x8A, ZX81 character 0x89.png ZX80 character 0x8B, ZX81 character 0x8A.png £$:?
9x()-+*/=><;,.0123
Ax456789ABCDEFGHIJ
BxKLMNOPQRSTUVWXYZ
Cx
Dx" [lower-alpha 2] THENTO;,)(NOT-+*/
ExANDOR** [lower-alpha 4] => [lower-alpha 1] < [lower-alpha 1] LISTRETURNCLSDIMSAVEFORGO TOPOKEINPUTRANDOMISE
FxLETNEXTPRINTNEWRUNSTOPCONTINUEIFGO SUBLOADCLEARREM
   Sinclair BASIC tokenizes keywords into single-byte code points.

Notes

  1. 1 2 3 The ZX80 Operating Manual has an error and shows the > and < symbols in the wrong order. [5]
  2. 1 2 Code point 1 is the double-quote (") symbol when used in the video memory (called the display file), but it is used internally as the string terminator character [1] so CHR$(1) returns a null string. Code point 212, CHR$(212), translates to the printable " character.
  3. 1 2 Because they are 50% gray rasters, code points 9 and 137 have the same appearance although every pixel is inverted.
  4. The raise to a power 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">ZX Spectrum</span> 1982 series of home computers

The ZX Spectrum is an 8-bit home computer developed and marketed by Sinclair Research. It was first released in the United Kingdom on 23 April 1982, and around the world in the following years, most notably in Europe, the United States, and Eastern Bloc countries.

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

<span class="mw-page-title-main">Atari BASIC</span> Dialect of the BASIC programming language

Atari BASIC is an interpreter for the BASIC programming language that shipped with the Atari 8-bit family of 6502-based home computers. Unlike most American BASICs of the home computer era, Atari BASIC is not a derivative of Microsoft BASIC and differs in significant ways. It includes keywords for Atari-specific features and lacks support for string arrays, for example.

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

The Glyph Bitmap Distribution Format (BDF) by Adobe is a file format for storing bitmap fonts. The content takes the form of a text file intended to be human- and computer-readable. BDF is typically used in Unix X Window environments. It has largely been replaced by the PCF font format which is somewhat more efficient, and by scalable fonts such as OpenType and TrueType fonts.

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.

Ringo R-470 was a Brazilian clone of the Sinclair ZX81 by Ritas do Brasil Ltda. introduced in 1983. It featured a Z80A processor at 3.25 MHz, 8K ROM and 16 KB RAM. It wasn't 100% compatible with the ZX81, and some BASIC tokens have alternate codings.

<span class="mw-page-title-main">Lambda 8300</span> Sinclair ZX81 clone from Lambda Electronics Limited of Hong Kong

The Lambda 8300 was a Sinclair ZX81 clone from Lambda Electronics Limited of Hong Kong. It had a modified ROM and extra hardware, making it not fully compatible. Total compatibility could be achieved by installing a ZX81 ROM.

<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">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">ZX81 character set</span> Character encoding used in the Sinclair ZX81 computers

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.

<span class="mw-page-title-main">BASIC interpreter</span> Interpreter that enables users to enter and run programs in the BASIC language

A BASIC interpreter is an interpreter that enables users to enter and run programs in the BASIC language and was, for the first part of the microcomputer era, the default application that computers would launch. Users were expected to use the BASIC interpreter to type in programs or to load programs from storage.

References

  1. 1 2 3 Wearmouth, Geoff. "An Assembly Listing of the ROM of the Sinclair ZX80". Archived from the original on August 15, 2015.
  2. Davenport, Hugo (1980). A Course in BASIC Programming - Sinclair ZX80 Operating Manual. Science of Cambridge Ltd. pp. 75–77. Archived from the original on 2022-08-08.
  3. 1 2 Davenport, Hugo (1980). A Course in BASIC Programming - Sinclair ZX80 Operating Manual. Science of Cambridge Ltd. pp. 116–117. Archived from the original on 2022-08-08.
  4. Farrow, Paul. "ZX80 - 8K BASIC ROM Upgrade". Sinclair ZX Resource Centre.
  5. "Sinclair ZX80 Character Set". OoCities.org.

See also