1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-06-25 19:29:49 +00:00

Change string terminators for petscr and atasciiscr (related to #17)

This commit is contained in:
Karol Stasiak 2019-11-04 02:38:07 +01:00
parent 6fd0257222
commit f10ec698ef
4 changed files with 12 additions and 5 deletions

View File

@ -2,6 +2,9 @@
## Current version
* **Breaking change!**
The `petscr`, `petscrjp` and `atasciiscr` encodings now use $E0 and $DB respectively as their string terminator.
* Added `nullchar_scr` and `NULLCHAR_SCR`
* Added the `scrstring` module

View File

@ -51,8 +51,10 @@ The exact value of that byte 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 the `petscr` and `petscrjp` encodings it's 224,
* in the `atascii` encoding it's 219,
* in the `utf16be` and `utf16le` encodings it's exceptionally two bytes: 0, 0
* in other encodings it's 0 (this **will** be a subject to change in future versions).
* in other encodings it's 0 (this may be a subject to change in future versions).
"this is a zero-terminated string" asciiz
"this is also a zero-terminated string"z

View File

@ -87,8 +87,10 @@ The exact value of `{nullchar}` is encoding-dependent:
* in the `vectrex` encoding it's `{x80}`,
* in the `zx80` encoding it's `{x01}`,
* in the `zx81` encoding it's `{x0b}`,
* in the `petscr` and `petscrjp` encodings it's `{xe0}`,
* in the `atasciiscr` encoding it's `{xdb}`,
* in the `utf16be` and `utf16le` encodings it's exceptionally two bytes: `{x00}{x00}`
* in other encodings it's `{x00}` (this **will** be a subject to change in future versions).
* in other encodings it's `{x00}` (this may be a subject to change in future versions).
##### Available only in some encodings

View File

@ -449,7 +449,7 @@ object TextCodec {
Map('Ë' -> '$'.toInt, 'ë' -> '_'.toInt),
Map.empty, AsciiEscapeSequences)
val CbmScreencodes = new TableTextCodec("CBM-Screen", 0,
val CbmScreencodes = new TableTextCodec("CBM-Screen", 0xE0,
"@abcdefghijklmnopqrstuvwxyz[£]↑←" +
0x20.to(0x3f).map(_.toChar).mkString +
"ABCDEFGHIJKLMNOPQRSTUVWXYZ\ufffd\ufffd\ufffdπ",
@ -460,7 +460,7 @@ object TextCodec {
)
)
lazy val CbmScreencodesJp = new TableTextCodec("CBM-Screen-JP", 0,
lazy val CbmScreencodesJp = new TableTextCodec("CBM-Screen-JP", 0xE0,
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]↑←" + // 00-1f
0x20.to(0x3f).map(_.toChar).mkString +
"タチツテトナニヌネノハヒフヘホマ" + // 40-4f
@ -662,7 +662,7 @@ object TextCodec {
)
)
lazy val AtasciiScreencodes = new TableTextCodec("ATASCII-Screen", 0,
lazy val AtasciiScreencodes = new TableTextCodec("ATASCII-Screen", 0xDB,
0x20.to(0x3f).map(_.toChar).mkString +
0x40.to(0x5f).map(_.toChar).mkString +
"♡" +