Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

ZX81 character set

From Wikipedia, the free encyclopedia
Character encoding used in the Sinclair ZX81 computers
Sinclair ZX81 character set
The Sinclair ZX81 character set rendered in the system font.
LanguageEnglish withpseudographics
Created bySinclair Research
Preceded byZX80 character set
Succeeded byZX Spectrum character set

TheZX81 character set is thecharacter encoding used by theSinclair ResearchZX81 family ofmicrocomputers including theTimex Sinclair 1000 andTimex Sinclair 1500. 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 predecessor ZX80.

Printable characters

[edit]
Screenshot of aZX81 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 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 such as 118 fornewline or, uniquely toSinclair BASIC, for keywords, while some are unused.

The small effective range of only 64 unique glyphs precludes support forLatinlower case letters, and many symbols used widely in computing such as theexclamation point and theat sign. The lack of anapostrophe led some software authors to use a comma instead.

There are 11block 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 theBlock ElementsUnicode block. An additional 3 characters provide a cell divided into 1×2 black, white ordithered 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 22block graphics characters in total. The dithered characters (of which there are 6) are also available in Unicode (mostly in theSymbols 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 functionCHR$ 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

[edit]

The character set in the ZX81 was derived from theZX80 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 BASICROM 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 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.

Character set

[edit]

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

ZX81 character set[1][3]
0123456789ABCDEF
0x SP "[a]£$:?
1x()><=+-*/;,.0123
2x456789ABCDEFGHIJ
3xKLMNOPQRSTUVWXYZ
4xRNDINKEY$PI
5x
6x
7xUPDOWNLEFTRIGHTgraphicsEDITnewlineruboutK/L
MODE
functionnumbercursor
8x"£$:?
9x()><=+-*/;,.0123
Ax456789ABCDEFGHIJ
BxKLMNOPQRSTUVWXYZ
Cx""[a]ATTABCODEVALLENSINCOSTANASNACSATNLNEXPINT
DxSQRSGNABSPEEKUSRSTR$CHR$NOT**[b]ORAND<=[c]>=[d]<>[e]THENTO
ExSTEPLPRINTLLISTSTOPSLOWFASTNEWSCROLLCONTDIMREMFORGOTOGOSUBINPUTLOAD
FxLISTLETPAUSENEXTPOKEPRINTPLOTRUNSAVERANDIFCLSUNPLOTCLEARRETURNCOPY
  Sinclair BASICtokenizes keywords into single-byte code points.

See also

[edit]

Notes

[edit]
  1. ^abCode 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 astring without conflict with the " string delimiter.[1]
  2. ^Theraise to a power multi-character operatortokenized into a single-byte code point.
  3. ^Thegreater than or equal to multi-character operatortokenized into a single-byte code point.
  4. ^Theless than or equal to multi-character operatortokenized into a single-byte code point.
  5. ^Thenot equal sign multi-character operatortokenized into a single-byte code point.

References

[edit]
  1. ^abcVickers, Steven (1981).Sinclair ZX81 BASIC Programming. Sinclair Research Ltd. Archived fromthe original on 2007-04-22. Retrieved2016-03-24.
  2. ^"8K BASIC ROM UPGRADE".
  3. ^Wearmouth, Geoff."An Assembly Listing of the Operating System of the ZX81 ROM". Archived fromthe original on August 15, 2015.
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=ZX81_character_set&oldid=1300897986"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp