1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-20 18:16:35 +00:00

Add strz_from_screencode, strz_to_screencode, ENCCONV_SUPPORTED

This commit is contained in:
Karol Stasiak
2019-11-04 02:28:12 +01:00
parent 055d842c12
commit 798c49fd34
4 changed files with 89 additions and 1 deletions
+2
View File
@@ -54,6 +54,8 @@ The following features are defined based on the chosen CPU and compilation optio
`CPUFEATURE_8080`, `CPUFEATURE_8085`, `CPUFEATURE_GAMEBOY`, `CPUFEATURE_Z80`,
`CPUFEATURE_6502_ILLEGALS`, `CPUFEATURE_8085_ILLEGALS`, `CPUFEATURE_Z80_ILLEGALS`, `CPUFEATURE_Z80_NEXT` 1 if given instruction subset is enabled, 0 otherwise
* `ENCCONV_SUPPORTED` - 1 if the module `encconv` supports the function `to_screencode` and other related funtions, 0 otherwise.
* `ENCODING_SAME` - 1 if the encodings `default` and `src` are the same, 0 otherwise.
* `NULLCHAR_SAME` - 1 if the encodings `default` and `src` have the same string terminator, 0 otherwise.
+14
View File
@@ -31,6 +31,8 @@ Available only if one of the following is true:
* the default encoding is `atascii`, the screen encoding is `atasciiscr`, and the platform is 6502-based
You can test for the availability of this function using the `ENCCONV_SUPPORTED` preprocessor feature.
#### byte from_screencode(byte)
Converts a byte from the screen encoding to the default encoding.
@@ -39,6 +41,18 @@ If both encodings contain the character `¤`, then `from_screencode('¤'scr) ==
Available only if `to_screencode` is available.
#### void strz_to_screencode(pointer)
Destructively converts a null-terminated string from the `default` encoding into the `scr` encoding.
Available only if `to_screencode` is available.
#### void strz_from_screencode(pointer)
Destructively converts a null-terminated string from the `scr` encoding into the `default` encoding.
Available only if `from_screencode` is available.
#### byte petscii_to_petscr(byte)
Converts a byte from PETSCII to a CBM screencode.