1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-19 10:42:10 +00:00

Add zx80, zx81 and iso15 encodings

This commit is contained in:
Karol Stasiak
2019-09-20 19:41:53 +02:00
parent 6c3523d5af
commit 680e94c3b7
4 changed files with 134 additions and 51 deletions
+6 -2
View File
@@ -37,8 +37,12 @@ Two encoding names are special and refer to platform-specific encodings:
You can also append `z` to the name of the encoding to make the string zero-terminated.
This means that the string will have one extra byte appended, equal to `nullchar`.
The exact value of `nullchar` is encoding-dependent: in the `vectrex` encoding it's $80,
in other encodings it's 0 (this might be a subject to change in future versions).
The exact value of `nullchar` is encoding-dependent:
* in the `vectrex` encoding it's 128,
* in the `zx80` encoding it's 1,
* in the `zx81` encoding it's 11,
* in other encodings it's 0 (this might be a subject to change in future versions).
"this is a zero-terminated string" asciiz
"this is also a zero-terminated string"z
+34 -22
View File
@@ -29,12 +29,20 @@
* `sinclair` ZX Spectrum character set
* `zx80` ZX80 character set
* `zx81` ZX81 character set
* `jis` or `jisx` JIS X 0201
* `iso_de`, `iso_no`, `iso_se`, `iso_yu` various variants of ISO/IEC-646
* `iso_dk`, `iso_fi` aliases for `iso_no` and `iso_se` respectively
* `iso15` ISO 8859-15
* `latin0`, `latin9`, `iso8859_15` aliases for `iso15`
* `msx_intl`, `msx_jp`, `msx_ru`, `msx_br` MSX character encoding, International, Japanese, Russian and Brazilian respectively
* `msx_us`, `msx_uk`, `msx_fr`, `msx_de` aliases for `msx_intl`
@@ -61,8 +69,6 @@ Some escape sequences may expand to multiple characters. For example, in several
* `{q}` double quote symbol
* `{apos}` apostrophe/single quote
* `{x00}``{xff}` a character of the given hexadecimal value
* `{copyright_year}` this expands to the current year in digits
@@ -75,6 +81,8 @@ Some escape sequences may expand to multiple characters. For example, in several
##### Available only in some encodings
* `{apos}` apostrophe/single quote (available everywhere except for `zx80` and `zx81`)
* `{n}` new line
* `{b}` backspace
@@ -91,29 +99,31 @@ control codes for changing the text background color
* `{reverse}`, `{reverseoff}` inverted mode on/off
* `{yen}`, `{pound}`, `{copy}` yen symbol, pound symbol, copyright symbol
* `{yen}`, `{pound}`, `{cent}`, `{euro}`, `{copy}` yen symbol, pound symbol, cent symbol, euro symbol, copyright symbol
##### Character availability
Encoding | lowercase letters | backslash | pound | yen | intl | card suits
---------|-------------------|-----------|-------|-----|------|-----------
`pet`, | yes¹ | no | yes | no | none | yes¹
`origpet` | yes¹ | yes | no | no | none | yes¹
`oldpet` | yes² | yes | no | no | none | yes²
`petscr` | yes¹ | no | yes | no | none | yes¹
`petjp` | no | no | no | yes | katakana³ | yes³
`petscrjp` | no | no | no | yes | katakana³ | yes³
`sinclair`, `bbc` | yes | yes | yes | no | none | no
`apple2` | no | yes | no | no | none | no
`atascii` | yes | yes | no | no | none | yes
`atasciiscr` | yes | yes | no | no | none | yes
`jis` | yes | no | no | yes | both kana | no
`msx_intl`,`msx_br` | yes | yes | yes | yes | Western | yes
`msx_jp` | yes | no | no | yes | katakana | yes
`msx_ru` | yes | yes | no | no | Russian⁴ | yes
`koi7n2` | no | yes | no | no | Russian | no
`vectrex` | no | yes | no | no | none | no
all the rest | yes | yes | no | no | none | no
Encoding | lowercase letters | backslash | currencies | intl | card suits
---------|-------------------|-----------|------------|------|-----------
`pet`, | yes¹ | no | £ | none | yes¹
`origpet` | yes¹ | yes | | none | yes¹
`oldpet` | yes² | yes | | none | yes²
`petscr` | yes¹ | no | £ | none | yes¹
`petjp` | no | no | ¥ | katakana³ | yes³
`petscrjp` | no | no | ¥ | katakana³ | yes³
`sinclair`, `bbc` | yes | yes | £ | none | no
`zx80`, `zx81` | no | no | £ | none | no
`apple2` | no | yes | | none | no
`atascii` | yes | yes | | none | yes
`atasciiscr` | yes | yes | | none | yes
`jis` | yes | no | ¥ | both kana | no
`iso15` | yes | yes | €¢£¥ | Western | no
`msx_intl`,`msx_br` | yes | yes | ¢£¥ | Western | yes
`msx_jp` | yes | no | ¥ | katakana | yes
`msx_ru` | yes | yes | | Russian⁴ | yes
`koi7n2` | no | yes | | Russian⁵ | no
`vectrex` | no | yes | | none | no
all the rest | yes | yes | | none | no
1. `pet`, `origpet` and `petscr` cannot display card suit symbols and lowercase letters at the same time.
Card suit symbols are only available in graphics mode,
@@ -144,7 +154,9 @@ Encoding | new line | braces | backspace | cursor movement | text colour | rever
`oldpet` | yes | no | no | yes | no | yes | no
`petscr`, `petscrjp`| no | no | no | no | no | no | no
`sinclair` | yes | yes | no | yes | yes | yes | yes
`zx80`,`zx81` | yes | no | yes | yes | no | no | no
`ascii`, `iso_*` | yes | yes | yes | no | no | no | no
`iso15` | yes | yes | yes | no | no | no | no
`apple2` | no | yes | no | no | no | no | no
`atascii` | yes | no | yes | yes | no | no | no
`atasciiscr` | no | no | no | no | no | no | no