Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

ZX80 character set

From Wikipedia, the free encyclopedia
Character set
Sinclair ZX80 character set
The Sinclair ZX80 character set rendered in the system font.
LanguageEnglish withpseudographics
Created bySinclair Research
Succeeded byZX81 character set
Other related encodingZX Spectrum character set

TheZX80 character set is thecharacter encoding used by theSinclair ResearchZX80microcomputer with its original 4KBASICROM. The encoding uses onebyte per character for 256 code points. It has no relationship with previously established ones likeASCII orEBCDIC, but it is related though not identical to thecharacter set of the successor ZX81.

Printable characters

[edit]
Screenshot of aZX80 4K BASIC program that demonstrates all code points including BASIC keywords and nonprintable characters, the latter rendered as question marks exceptCHR$(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 themost significant bit set the character is generated ininverse 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 orSinclair BASIC keywords, while some are unused.

The small effective range of only 64 unique glyphs has led to the exclusion of many characters, includingLatinlower case letters and symbols used widely in computing such as theexclamation mark and theat sign.

There are 11block 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 ordithered gray wide block pixels for a 32×48 resolution. The 2×2 versions of these are also present in theBlock ElementsUnicode 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 thestring terminator character[1] so the BASIC functionCHR$(1) returns a null string;[2]CHR$(212) translates to the printable " character.[3]

Changes in the ZX81

[edit]

The 8K BASICROM of the follow-upZX81 model was also available as an upgrade for the ZX80, replacing its integer-only 4K BASIC ROM.[4] It introduced the modifiedZX81 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 laterZX Spectrum the entire character encoding was replaced with theZX Spectrum character set, which is a derivative of ASCII and includes lower case letters and more.

System font

[edit]

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

[edit]

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

ZX80 character set[1][3][a]
0123456789ABCDEF
0x SP "[b][c]£$:?
1x()-+*/=><;,.0123
2x456789ABCDEFGHIJ
3xKLMNOPQRSTUVWXYZ
4x
5x
6x
7xUPDOWNLEFTRIGHTHOMEEDITNELRUBOUT
8x"[c]£$:?
9x()-+*/=><;,.0123
Ax456789ABCDEFGHIJ
BxKLMNOPQRSTUVWXYZ
Cx
Dx"[b]THENTO;,)(NOT-+*/
ExANDOR**[d]=>[a]<[a]LISTRETURNCLSDIMSAVEFORGO TOPOKEINPUTRANDOMISE
FxLETNEXTPRINTNEWRUNSTOPCONTINUEIFGO SUBLOADCLEARREM
  Sinclair BASICtokenizes keywords into single-byte code points.

Notes

[edit]
  1. ^abcThe ZX80 Operating Manual has an error and shows the > and < symbols in the wrong order.[5]
  2. ^abCode point 1 is the double-quote (") symbol when used in the video memory (called the display file), but it is used internally as thestring terminator character[1] soCHR$(1) returns a null string. Code point 212,CHR$(212), translates to the printable " character.
  3. ^abBecause they are 50% gray rasters, code points 9 and 137 have the same appearance although every pixel isinverted.
  4. ^Theraise to a power multi-character operatortokenized into a single-byte code point.

References

[edit]
  1. ^abcWearmouth, Geoff."An Assembly Listing of the ROM of the Sinclair ZX80". Archived fromthe 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 fromthe original on 2022-08-08.
  3. ^abDavenport, Hugo (1980).A Course in BASIC Programming - Sinclair ZX80 Operating Manual. Science of Cambridge Ltd. pp. 116–117. Archived fromthe 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

[edit]
Early telecommunications
ISO/IEC 8859
Bibliographic use
National standards
ISO/IEC 2022
Mac OSCode pages
("scripts")
DOS code pages
IBM AIX code pages
Windows code pages
EBCDIC code pages
DEC terminals (VTx)
Platform specific
Unicode /ISO/IEC 10646
TeX typesetting system
Miscellaneous code pages
Control character
Related topics
Retrieved from "https://en.wikipedia.org/w/index.php?title=ZX80_character_set&oldid=1320907506"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp