ZX Spectrum/Набор символов: различия между версиями

Материал из Emuverse
(копия статьи из Википедии-ру, там статья под угрозой удаления)
 
Нет описания правки
Строка 5: Строка 5:
Печатные символы с кодами в диапазоне 0x20-0x7F совпадают с ASCII-1963, за исключением знака фунта (£) с кодом 0x60 вместо знака акцента ( ` ), а также символа копирайта (©) вместо контрольного кода 0x7F (DEL).
Печатные символы с кодами в диапазоне 0x20-0x7F совпадают с ASCII-1963, за исключением знака фунта (£) с кодом 0x60 вместо знака акцента ( ` ), а также символа копирайта (©) вместо контрольного кода 0x7F (DEL).


Блок 0x80–0x8F используется для символов псевдографики. Диапазон 0x90–0xA4 отведён под символы, определяемые пользователем (User Defined Graphics, UDG). Коды 0xA5–0xFF соответствуют ключевым словам языка BASIC. ZX Spectrum 128 также использует два последних символа UDG для ключевых слов SPECTRUM и PLAY.
Блок 0x80–0x8F используется для символов псевдографики. Диапазон 0x90–0xA4 отведён под символы, определяемые пользователем (User Defined Graphics, UDG). Коды 0xA5–0xFF соответствуют ключевым словам языка BASIC. ZX Spectrum 128 также использует два последних символа UDG для ключевых слов SPECTRUM и PLAY<ref name="man_a">ZX Spectrum manual, Appendix A, the character set</ref>.


{| class="wikitable chset" frame="box" width="100%" style="text-align: center; border-collapse: collapse"
{| class="wikitable chset" style="text-align: center; border-collapse: collapse"
|-
|-
! !! 0x !! 1x !! 2x|| 3x !! 4x !! 5x !! 6x !! 7x !! 8x !! 9x !! Ax !! Bx !! Cx !! Dx !! Ex !! Fx
! colspan=18 | Spectrum Character Set<ref name="man_a"/>
|-
! !! 0x keypress !! 0x character !! 1x !! 2x|| 3x !! 4x !! 5x !! 6x !! 7x !! 8x !! 9x !! Ax !! Bx !! Cx !! Dx !! Ex !! Fx
|-
|-
! x0
! x0
| || INK || <tt>&nbsp;</tt> || <tt>0</tt> || <tt>@</tt> || <tt>P</tt> || <tt>£</tt> || <tt>p</tt> || [[Файл:ZXSpectrum80.svg]] || (A) || (Q) || '''VAL''' || '''USR''' || '''FORMAT''' || '''LPRINT''' || '''LIST'''
| || || {{chset-color-ctrl}} | INK || {{chset-color-punct}} | <tt>&nbsp;</tt> || {{chset-color-digit}} | <tt>0</tt> || {{chset-color-punct}} | <tt>@</tt> || {{chset-color-alpha}} | <tt>P</tt> || {{chset-color-punct}} | <tt>£</tt> || {{chset-color-alpha}} | <tt>p</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum80.svg]] || {{chset-color-graph}} | (A) || {{chset-color-graph}} | (Q) || '''VAL''' || '''USR''' || '''FORMAT''' || '''LPRINT''' || '''LIST'''
|-
|-
! x1
! x1
| || PAPER || <tt>!</tt> || <tt>1</tt> || <tt>A</tt> || <tt>Q</tt> || <tt>a</tt> || <tt>q</tt> || [[Файл:ZXSpectrum81.svg]] || (B) || (R) || '''LEN''' || '''STR$''' || '''MOVE''' || '''LLIST''' || '''LET'''
| || || {{chset-color-ctrl}} | PAPER || {{chset-color-punct}} | <tt>!</tt> || {{chset-color-digit}} | <tt>1</tt> || {{chset-color-alpha}} | <tt>A</tt> || {{chset-color-alpha}} | <tt>Q</tt> || {{chset-color-alpha}} | <tt>a</tt> || {{chset-color-alpha}} | <tt>q</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum81.svg]] || {{chset-color-graph}} | (B) || {{chset-color-graph}} | (R) || '''LEN''' || '''STR$''' || '''MOVE''' || '''LLIST''' || '''LET'''
|-
|-
! x2
! x2
| || FLASH || <tt>"</tt> || <tt>2</tt> || <tt>B</tt> || <tt>R</tt> || <tt>b</tt> || <tt>r</tt> || [[Файл:ZXSpectrum82.svg]] || (C) || (S) || '''SIN''' || '''CHR$''' || '''ERASE''' || '''STOP''' || '''PAUSE'''
| || || {{chset-color-ctrl}} | FLASH || {{chset-color-punct}} | <tt>"</tt> || {{chset-color-digit}} | <tt>2</tt> || {{chset-color-alpha}} | <tt>B</tt> || {{chset-color-alpha}} | <tt>R</tt> || {{chset-color-alpha}} | <tt>b</tt> || {{chset-color-alpha}} | <tt>r</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum82.svg]] || {{chset-color-graph}} | (C) || {{chset-color-graph}} | (S) || '''SIN''' || '''CHR$''' || '''ERASE''' || '''STOP''' || '''PAUSE'''
|-
|-
! x3
! x3
| || BRIGHT || <tt>#</tt> || <tt>3</tt> || <tt>C</tt> || <tt>S</tt> || <tt>c</tt> || <tt>s</tt> || [[Файл:ZXSpectrum83.svg]] || (D) || (T)<sup>*</sup> || '''COS''' || '''NOT''' || '''OPEN&nbsp;#''' || '''READ''' || '''NEXT'''
| || || {{chset-color-ctrl}} | BRIGHT || {{chset-color-punct}} | <tt>#</tt> || {{chset-color-digit}} | <tt>3</tt> || {{chset-color-alpha}} | <tt>C</tt> || {{chset-color-alpha}} | <tt>S</tt> || {{chset-color-alpha}} | <tt>c</tt> || {{chset-color-alpha}} | <tt>s</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum83.svg]] || {{chset-color-graph}} | (D) || {{chset-color-graph}} | (T)<sup>4</sup> || '''COS''' || '''NOT''' || '''OPEN&nbsp;#''' || '''READ''' || '''NEXT'''
|-
|-
! x4
! x4
| || INVERSE || <tt>$</tt> || <tt>4</tt> || <tt>D</tt> || <tt>T</tt> || <tt>d</tt> || <tt>t</tt> || [[Файл:ZXSpectrum84.svg]] || (E) || (U)<sup>**</sup> || '''TAN''' || '''BIN''' || '''CLOSE&nbsp;#''' || '''DATA''' || '''POKE'''
| true video || || {{chset-color-ctrl}} | INVERSE || {{chset-color-punct}} | <tt>$</tt> || {{chset-color-digit}} | <tt>4</tt> || {{chset-color-alpha}} | <tt>D</tt> || {{chset-color-alpha}} | <tt>T</tt> || {{chset-color-alpha}} | <tt>d</tt> || {{chset-color-alpha}} | <tt>t</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum84.svg]] || {{chset-color-graph}} | (E) || {{chset-color-graph}} | (U)<sup>5</sup> || '''TAN''' || '''BIN''' || '''CLOSE&nbsp;#''' || '''DATA''' || '''POKE'''
|-
|-
! x5
! x5
| || OVER || <tt>%</tt> || <tt>5</tt> || <tt>E</tt> || <tt>U</tt> || <tt>e</tt> || <tt>u</tt> || [[Файл:ZXSpectrum85.svg]] || (F) || '''RND''' || '''ASN''' || '''OR''' || '''MERGE''' || '''RESTORE''' || '''PRINT'''
| inv video || || {{chset-color-ctrl}} | OVER || {{chset-color-punct}} | <tt>%</tt> || {{chset-color-digit}} | <tt>5</tt> || {{chset-color-alpha}} | <tt>E</tt> || {{chset-color-alpha}} | <tt>U</tt> || {{chset-color-alpha}} | <tt>e</tt> || {{chset-color-alpha}} | <tt>u</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum85.svg]] || {{chset-color-graph}} | (F) || '''RND''' || '''ASN''' || '''OR''' || '''MERGE''' || '''RESTORE''' || '''PRINT'''
|-
|-
! x6
! x6
| comma || AT || <tt>&</tt> || <tt>6</tt> || <tt>F</tt> || <tt>V</tt> || <tt>f</tt> || <tt>v</tt> || [[Файл:ZXSpectrum86.svg]] || (G) || '''INKEY$''' || '''ACS''' || '''AND''' || '''VERIFY''' || '''NEW''' || '''PLOT'''
| caps lock || comma || {{chset-color-ctrl}} | AT || {{chset-color-punct}} | <tt>&</tt> || {{chset-color-digit}} | <tt>6</tt> || {{chset-color-alpha}} | <tt>F</tt> || {{chset-color-alpha}} | <tt>V</tt> || {{chset-color-alpha}} | <tt>f</tt> || {{chset-color-alpha}} | <tt>v</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum86.svg]] || {{chset-color-graph}} | (G) || '''INKEY$''' || '''ACS''' || '''AND''' || '''VERIFY''' || '''NEW''' || '''PLOT'''
|-
|-
! x7
! x7
| || TAB || <tt>'</tt> || <tt>7</tt> || <tt>G</tt> || <tt>W</tt> || <tt>g</tt> || <tt>w</tt> || [[Файл:ZXSpectrum87.svg]] || (H) || '''PI''' || '''ATN''' || '''&lt;=''' || '''BEEP''' || '''BORDER''' || '''RUN'''
| edit || || {{chset-color-ctrl}} | TAB || {{chset-color-punct}} | <tt>'</tt> || {{chset-color-digit}} | <tt>7</tt> || {{chset-color-alpha}} | <tt>G</tt> || {{chset-color-alpha}} | <tt>W</tt> || {{chset-color-alpha}} | <tt>g</tt> || {{chset-color-alpha}} | <tt>w</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum87.svg]] || {{chset-color-graph}} | (H) || '''PI''' || '''ATN''' || '''&lt;=''' || '''BEEP''' || '''BORDER''' || '''RUN'''
|-
|-
! x8
! x8
| left || || <tt>(</tt> || <tt>8</tt> || <tt>H</tt> || <tt>X</tt> || <tt>h</tt> || <tt>x</tt> || [[Файл:ZXSpectrum88.svg]] || (I) || '''FN''' || '''LN''' || '''&gt;=''' || '''CIRCLE''' || '''CONTINUE''' || '''SAVE'''
| left || left<sup>1</sup> || || {{chset-color-punct}} | <tt>(</tt> || {{chset-color-digit}} | <tt>8</tt> || {{chset-color-alpha}} | <tt>H</tt> || {{chset-color-alpha}} | <tt>X</tt> || {{chset-color-alpha}} | <tt>h</tt> || {{chset-color-alpha}} | <tt>x</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum88.svg]] || {{chset-color-graph}} | (I) || '''FN''' || '''LN''' || '''&gt;=''' || '''CIRCLE''' || '''CONTINUE''' || '''SAVE'''
|-
|-
! x9
! x9
| right || || <tt>)</tt> || <tt>9</tt> || <tt>I</tt> || <tt>Y</tt> || <tt>i</tt> || <tt>y</tt> || [[Файл:ZXSpectrum89.svg]] || (J) || '''POINT''' || '''EXP''' || '''&lt;&gt;''' || '''INK''' || '''DIM''' || '''RANDOMIZE'''
| right || right<sup>2</sup> || || {{chset-color-punct}} | <tt>)</tt> || {{chset-color-digit}} | <tt>9</tt> || {{chset-color-alpha}} | <tt>I</tt> || {{chset-color-alpha}} | <tt>Y</tt> || {{chset-color-alpha}} | <tt>i</tt> || {{chset-color-alpha}} | <tt>y</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum89.svg]] || {{chset-color-graph}} | (J) || '''POINT''' || '''EXP''' || '''&lt;&gt;''' || '''INK''' || '''DIM''' || '''RANDOMIZE'''
|-
|-
! xA
! xA
| down || || <tt>*</tt> || <tt>:</tt> || <tt>J</tt> || <tt>Z</tt> || <tt>j</tt> || <tt>z</tt> || [[Файл:ZXSpectrum8a.svg]] || (K) || '''SCREEN$''' || '''INT''' || '''LINE''' || '''PAPER''' || '''REM''' || '''IF'''
| down || || || {{chset-color-punct}} | <tt>*</tt> || {{chset-color-punct}} | <tt>:</tt> || {{chset-color-alpha}} | <tt>J</tt> || {{chset-color-alpha}} | <tt>Z</tt> || {{chset-color-alpha}} | <tt>j</tt> || {{chset-color-alpha}} | <tt>z</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum8a.svg]] || {{chset-color-graph}} | (K) || '''SCREEN$''' || '''INT''' || '''LINE''' || '''PAPER''' || '''REM''' || '''IF'''
|-
|-
! xB
! xB
| up || || <tt>+</tt> || <tt>;</tt> || <tt>K</tt> || <tt>[</tt> || <tt>k</tt> || <tt>{</tt> || [[Файл:ZXSpectrum8b.svg]] || (L) || '''ATTR''' || '''SQR''' || '''THEN''' || '''FLASH''' || '''FOR''' || '''CLS'''
| up || || || {{chset-color-punct}} | <tt>+</tt> || {{chset-color-punct}} | <tt>;</tt> || {{chset-color-alpha}} | <tt>K</tt> || {{chset-color-punct}} | <tt>[</tt> || {{chset-color-alpha}} | <tt>k</tt> || {{chset-color-punct}} | <tt>{</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum8b.svg]] || {{chset-color-graph}} | (L) || '''ATTR''' || '''SQR''' || '''THEN''' || '''FLASH''' || '''FOR''' || '''CLS'''
|-
|-
! xC
! xC
| delete || || <tt>,</tt> || <tt>&lt;</tt> || <tt>L</tt> || <tt>\</tt> || <tt>l</tt> || &#124; || [[Файл:ZXSpectrum8c.svg]] || (M) || '''AT''' || '''SGN''' || '''TO''' || '''BRIGHT''' || '''GO&nbsp;TO''' || '''DRAW'''
| delete || || || {{chset-color-punct}} | <tt>,</tt> || {{chset-color-punct}} | <tt>&lt;</tt> || {{chset-color-alpha}} | <tt>L</tt> || {{chset-color-punct}} | <tt>\</tt> || {{chset-color-alpha}} | <tt>l</tt> || {{chset-color-punct}} | <tt>{{pipe}}</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum8c.svg]] || {{chset-color-graph}} | (M) || '''AT''' || '''SGN''' || '''TO''' || '''BRIGHT''' || '''GO&nbsp;TO''' || '''DRAW'''
|-
|-
! xD
! xD
| enter || || <tt>-</tt> || <tt>=</tt> || <tt>M</tt> || <tt>]</tt> || <tt>m</tt> || <tt>}</tt> || [[Файл:ZXSpectrum8d.svg]] || (N) || '''TAB''' || '''ABS''' || '''STEP''' || '''INVERSE''' || '''GO&nbsp;SUB''' || '''CLEAR'''
| enter || enter || || {{chset-color-punct}} | <tt>-</tt> || {{chset-color-punct}} | <tt>=</tt> || {{chset-color-alpha}} | <tt>M</tt> || {{chset-color-punct}} | <tt>]</tt> || {{chset-color-alpha}} | <tt>m</tt> || {{chset-color-punct}} | <tt>}</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum8d.svg]] || {{chset-color-graph}} | (N) || '''TAB''' || '''ABS''' || '''STEP''' || '''INVERSE''' || '''GO&nbsp;SUB''' || '''CLEAR'''
|-
|-
! xE
! xE
| || || <tt>.</tt> || <tt>></tt> || <tt>N</tt> || <tt>^</tt> || <tt>n</tt> || <tt>~</tt> || [[Файл:ZXSpectrum8e.svg]] || (O) || '''VAL$''' || '''PEEK''' || '''DEF&nbsp;FN''' || '''OVER''' || '''INPUT''' || '''RETURN'''
| extend || number<sup>3</sup> || || {{chset-color-punct}} | <tt>.</tt> || {{chset-color-punct}} | <tt>></tt> || {{chset-color-alpha}} | <tt>N</tt> || {{chset-color-punct}} | <tt></tt> || {{chset-color-alpha}} | <tt>n</tt> || {{chset-color-punct}} | <tt>~</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum8e.svg]] || {{chset-color-graph}} | (O) || '''VAL$''' || '''PEEK''' || '''DEF&nbsp;FN''' || '''OVER''' || '''INPUT''' || '''RETURN'''
|-
|-
! xF
! xF
| || || <tt>/</tt> || <tt>?</tt> || <tt>O</tt> || <tt>_</tt> || <tt>o</tt> || <tt>©</tt> || [[Файл:ZXSpectrum8f.svg]] || (P) || '''CODE''' || '''IN''' || '''CAT''' || '''OUT''' || '''LOAD''' || '''COPY'''
| graphics || || || {{chset-color-punct}} | <tt>/</tt> || {{chset-color-punct}} | <tt>?</tt> || {{chset-color-alpha}} | <tt>O</tt> || {{chset-color-punct}} | <tt>_</tt> || {{chset-color-alpha}} | <tt>o</tt> || {{chset-color-punct}} | <tt>©</tt> || {{chset-color-graph}} | [[Image:ZXSpectrum8f.svg]] || {{chset-color-graph}} | (P) || '''CODE''' || '''IN''' || '''CAT''' || '''OUT''' || '''LOAD''' || '''COPY'''
|}
|}


(X) — символ относится к User Definable Graphics
(X) — символ относится к User Definable Graphics
<br /><sup>*</sup> — '''SPECTRUM''' в 128K BASIC
<sup>1</sup>In the Standard ROM CHR$8 fails backing from line 1 to line zero, and backing off line zero.<br>
<br /><sup>**</sup> — '''PLAY''' в 128K BASIC
<sup>2</sup>In the Standard ROM CHR$9 does not actually move the text output position.<br>
<sup>3</sup> Used in Basic programs as an inline marker prefixing a 5-byte floating point number. Is not a printable character or control code.<br>
<sup>4</sup> '''SPECTRUM''' in 128K BASIC.<br>
<sup>5</sup> '''PLAY''' in 128K BASIC.


== Ссылки ==
== Ссылки ==
Строка 68: Строка 73:
* [http://web.archive.org/web/20050307204242/http://eclecticsatyr.hostultra.com/speccs.htm Sinclair Spectrum+ 48K Character Set] с сайта Michael Zaretski
* [http://web.archive.org/web/20050307204242/http://eclecticsatyr.hostultra.com/speccs.htm Sinclair Spectrum+ 48K Character Set] с сайта Michael Zaretski
* [http://web.archive.org/web/20050307204242/http://eclecticsatyr.hostultra.com/speccs.txt Mapping table from Sinclair Spectrum+ 48K Character Set to Unicode]
* [http://web.archive.org/web/20050307204242/http://eclecticsatyr.hostultra.com/speccs.txt Mapping table from Sinclair Spectrum+ 48K Character Set to Unicode]
== Notes ==
{{reflist}}


[[Категория:ZX Spectrum]]
[[Категория:ZX Spectrum]]

Версия от 15:11, 12 декабря 2015

    Этот документ распространяется на условиях лицензии CC-BY-SA 3.0
Данная статья основана на материалах из Википедии. См. оригинал, список авторов
 

Набор символов ZX Spectrum — это вариант ASCII, используемый в 8-разрядном компьютере ZX Spectrum, его вариациях и клонах.

Печатные символы с кодами в диапазоне 0x20-0x7F совпадают с ASCII-1963, за исключением знака фунта (£) с кодом 0x60 вместо знака акцента ( ` ), а также символа копирайта (©) вместо контрольного кода 0x7F (DEL).

Блок 0x80–0x8F используется для символов псевдографики. Диапазон 0x90–0xA4 отведён под символы, определяемые пользователем (User Defined Graphics, UDG). Коды 0xA5–0xFF соответствуют ключевым словам языка BASIC. ZX Spectrum 128 также использует два последних символа UDG для ключевых слов SPECTRUM и PLAY[1].

Spectrum Character Set[1]
0x keypress 0x character 1x 2x 3x 4x 5x 6x 7x 8x 9x Ax Bx Cx Dx Ex Fx
x0 INK   0 @ P £ p (A) (Q) VAL USR FORMAT LPRINT LIST
x1 PAPER ! 1 A Q a q (B) (R) LEN STR$ MOVE LLIST LET
x2 FLASH " 2 B R b r (C) (S) SIN CHR$ ERASE STOP PAUSE
x3 BRIGHT # 3 C S c s (D) (T)4 COS NOT OPEN # READ NEXT
x4 true video INVERSE $ 4 D T d t (E) (U)5 TAN BIN CLOSE # DATA POKE
x5 inv video OVER % 5 E U e u (F) RND ASN OR MERGE RESTORE PRINT
x6 caps lock comma AT & 6 F V f v (G) INKEY$ ACS AND VERIFY NEW PLOT
x7 edit TAB ' 7 G W g w (H) PI ATN <= BEEP BORDER RUN
x8 left left1 ( 8 H X h x (I) FN LN >= CIRCLE CONTINUE SAVE
x9 right right2 ) 9 I Y i y (J) POINT EXP <> INK DIM RANDOMIZE
xA down * : J Z j z (K) SCREEN$ INT LINE PAPER REM IF
xB up + ; K [ k { (L) ATTR SQR THEN FLASH FOR CLS
xC delete , < L \ l | (M) AT SGN TO BRIGHT GO TO DRAW
xD enter enter - = M ] m } (N) TAB ABS STEP INVERSE GO SUB CLEAR
xE extend number3 . > N n ~ (O) VAL$ PEEK DEF FN OVER INPUT RETURN
xF graphics / ? O _ o © (P) CODE IN CAT OUT LOAD COPY

(X) — символ относится к User Definable Graphics 1In the Standard ROM CHR$8 fails backing from line 1 to line zero, and backing off line zero.
2In the Standard ROM CHR$9 does not actually move the text output position.
3 Used in Basic programs as an inline marker prefixing a 5-byte floating point number. Is not a printable character or control code.
4 SPECTRUM in 128K BASIC.
5 PLAY in 128K BASIC.

Ссылки

Notes

  1. 1,0 1,1 ZX Spectrum manual, Appendix A, the character set