mirror of
https://github.com/fadden/6502bench.git
synced 2025-08-09 05:24:58 +00:00
Tweak backslash escaping
The initial implementation was testing the byte value rather than the converted value, so backslashes were getting through in high ASCII strings. PETSCII and C64 screen codes don't really have a backslash so it's not really an issue there. The new implementation handles high ASCII correctly. The various 201n0-char-encoding-x regression tests have been updated to verify this.
This commit is contained in:
@@ -117,7 +117,7 @@ namespace Asm65 {
|
||||
/// isn't printable, the raw character value will be written as a byte instead.
|
||||
/// </summary>
|
||||
/// <param name="rawCh">Raw character value.</param>
|
||||
private void WriteChar(byte rawCh) {
|
||||
private void WriteChar(byte rawCh, bool recurOkay = true) {
|
||||
Debug.Assert(mState != State.Finished);
|
||||
|
||||
char ch = CharConv(rawCh);
|
||||
@@ -126,6 +126,9 @@ namespace Asm65 {
|
||||
// Must write it as a byte.
|
||||
WriteByte(rawCh);
|
||||
return;
|
||||
} else if (ch == '\\' && recurOkay && mBackslashEscapes) {
|
||||
// Recursively output two '\' instead of just one.
|
||||
WriteChar(rawCh, false);
|
||||
}
|
||||
|
||||
// If we're at the start of a line, add delimiter, then new char.
|
||||
@@ -212,7 +215,7 @@ namespace Asm65 {
|
||||
/// <summary>
|
||||
/// Tells the object to flush any pending data to the output.
|
||||
/// </summary>
|
||||
public void Finish() {
|
||||
private void Finish() {
|
||||
Flush();
|
||||
}
|
||||
|
||||
@@ -275,26 +278,17 @@ namespace Asm65 {
|
||||
}
|
||||
for (int off = endOffset - 1; off >= chunkOffset; off--) {
|
||||
WriteChar(data[off]);
|
||||
if (data[off] == '\\' && mBackslashEscapes) {
|
||||
WriteChar(data[off]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (revMode == ReverseMode.FullReverse) {
|
||||
for (; offset < strEndOffset; offset++) {
|
||||
int posn = startOffset + (strEndOffset - offset) - 1;
|
||||
WriteChar(data[posn]);
|
||||
if (data[posn] == '\\' && mBackslashEscapes) {
|
||||
WriteChar(data[posn]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Debug.Assert(revMode == ReverseMode.Forward);
|
||||
for (; offset < strEndOffset; offset++) {
|
||||
WriteChar(data[offset]);
|
||||
if (data[offset] == '\\' && mBackslashEscapes) {
|
||||
WriteChar(data[offset]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -674,6 +674,7 @@ namespace SourceGen.AsmGen {
|
||||
if (dfd.FormatSubType == FormatDescriptor.SubType.HighAscii && stropf.HasEscapedText) {
|
||||
// Can't !xor the output, because while it works for string data it
|
||||
// also flips the high bits on the unprintable bytes we output as raw hex.
|
||||
// We'd need to tell the string formatter to flip the high bit on the byte.
|
||||
OutputNoJoy(offset, dfd.Length, labelStr, commentStr);
|
||||
return;
|
||||
}
|
||||
|
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
### 6502bench SourceGen dis65 v1.0 ###
|
||||
{
|
||||
"_ContentVersion":4,
|
||||
"FileDataLength":1100,
|
||||
"FileDataCrc32":1553512360,
|
||||
"FileDataLength":1244,
|
||||
"FileDataCrc32":220973587,
|
||||
"ProjectProps":{
|
||||
"CpuName":"6502",
|
||||
"IncludeUndocumentedInstr":false,
|
||||
@@ -450,6 +450,222 @@
|
||||
"Length":15,
|
||||
"Format":"StringDci",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1103":{
|
||||
"Length":34,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"Ascii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1138":{
|
||||
"Length":16,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1154":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1155":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1157":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1158":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1159":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1160":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1161":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1163":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1164":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1166":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1167":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1169":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1170":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1172":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1173":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1175":{
|
||||
"Length":12,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1187":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1188":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1190":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1191":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1192":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1193":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1194":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1196":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1197":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1199":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1200":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1201":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1202":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1203":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1204":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1205":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1206":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1208":{
|
||||
"Length":33,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"HighAscii",
|
||||
"SymbolRef":null}},
|
||||
|
||||
"LvTables":{
|
||||
|
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
### 6502bench SourceGen dis65 v1.0 ###
|
||||
{
|
||||
"_ContentVersion":4,
|
||||
"FileDataLength":1100,
|
||||
"FileDataCrc32":1553512360,
|
||||
"FileDataLength":1244,
|
||||
"FileDataCrc32":220973587,
|
||||
"ProjectProps":{
|
||||
"CpuName":"6502",
|
||||
"IncludeUndocumentedInstr":false,
|
||||
@@ -450,6 +450,114 @@
|
||||
"Length":15,
|
||||
"Format":"StringDci",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1103":{
|
||||
"Length":34,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"Ascii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1138":{
|
||||
"Length":16,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1154":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1155":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1157":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1158":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1159":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1160":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1161":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1163":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1164":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1166":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1167":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1169":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1170":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1172":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1173":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1208":{
|
||||
"Length":33,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"HighAscii",
|
||||
"SymbolRef":null}},
|
||||
|
||||
"LvTables":{
|
||||
|
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
### 6502bench SourceGen dis65 v1.0 ###
|
||||
{
|
||||
"_ContentVersion":4,
|
||||
"FileDataLength":1100,
|
||||
"FileDataCrc32":1553512360,
|
||||
"FileDataLength":1244,
|
||||
"FileDataCrc32":220973587,
|
||||
"ProjectProps":{
|
||||
"CpuName":"6502",
|
||||
"IncludeUndocumentedInstr":false,
|
||||
@@ -450,6 +450,222 @@
|
||||
"Length":15,
|
||||
"Format":"StringDci",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1103":{
|
||||
"Length":34,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"Ascii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1138":{
|
||||
"Length":16,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1154":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1155":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1157":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1158":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1159":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1160":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1161":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1163":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1164":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1166":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1167":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1169":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1170":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1172":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1173":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Petscii",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1175":{
|
||||
"Length":12,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1187":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1188":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1190":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1191":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1192":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1193":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1194":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1196":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1197":{
|
||||
"Length":2,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1199":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1200":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1201":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1202":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1203":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1204":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1205":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Hex",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1206":{
|
||||
"Length":1,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"C64Screen",
|
||||
"SymbolRef":null},
|
||||
|
||||
"1208":{
|
||||
"Length":33,
|
||||
"Format":"StringGeneric",
|
||||
"SubFormat":"HighAscii",
|
||||
"SymbolRef":null}},
|
||||
|
||||
"LvTables":{
|
||||
|
@@ -202,5 +202,54 @@
|
||||
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
|
||||
.byte $ff
|
||||
|
||||
L144B rts
|
||||
L144B nop
|
||||
jmp _L14DA
|
||||
|
||||
.enc "sg_ascii"
|
||||
.text "ASCII escapes \: \\ \r \n \",$22," \' \t"
|
||||
.byte $80
|
||||
.enc "none"
|
||||
.text "PETSCII escapes "
|
||||
.byte $5c
|
||||
.text ": "
|
||||
.byte $5c
|
||||
.byte $5c
|
||||
.byte ' '
|
||||
.byte $5c
|
||||
.text "r "
|
||||
.byte $5c
|
||||
.text "n "
|
||||
.byte $5c
|
||||
.text $22," "
|
||||
.byte $5c
|
||||
.text "' "
|
||||
.byte $5c
|
||||
.byte 't'
|
||||
.byte $80
|
||||
.enc "screen"
|
||||
.text "SCR escapes "
|
||||
.byte $1c
|
||||
.text ": "
|
||||
.byte $1c
|
||||
.byte $1c
|
||||
.byte ' '
|
||||
.byte $1c
|
||||
.text "r "
|
||||
.byte $1c
|
||||
.text "n "
|
||||
.byte $1c
|
||||
.byte $22
|
||||
.byte ' '
|
||||
.byte $1c
|
||||
.byte $27
|
||||
.byte ' '
|
||||
.byte $1c
|
||||
.byte 't'
|
||||
.byte $80
|
||||
.enc "sg_hiascii"
|
||||
.text "HIGH escapes \: \\ \r \n \0 \' \t"
|
||||
.byte $80
|
||||
|
||||
_L14DA nop
|
||||
rts
|
||||
|
||||
|
@@ -173,5 +173,52 @@
|
||||
!hex e0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfe
|
||||
!byte $ff
|
||||
|
||||
L144B rts
|
||||
L144B nop
|
||||
jmp @L14DA
|
||||
|
||||
!text "ASCII escapes \\: \\\\ \\r \\n \\",$22," \\' \\t"
|
||||
!byte $80
|
||||
!pet "PETSCII escapes "
|
||||
!byte $5c
|
||||
!pet ": "
|
||||
!byte $5c
|
||||
!byte $5c
|
||||
!byte $20
|
||||
!byte $5c
|
||||
!pet "r "
|
||||
!byte $5c
|
||||
!pet "n "
|
||||
!byte $5c
|
||||
!pet $22," "
|
||||
!byte $5c
|
||||
!pet "' "
|
||||
!byte $5c
|
||||
!byte $54
|
||||
!byte $80
|
||||
!scr "SCR escapes "
|
||||
!byte $1c
|
||||
!scr ": "
|
||||
!byte $1c
|
||||
!byte $1c
|
||||
!byte $20
|
||||
!byte $1c
|
||||
!scr "r "
|
||||
!byte $1c
|
||||
!scr "n "
|
||||
!byte $1c
|
||||
!byte $22
|
||||
!byte $20
|
||||
!byte $1c
|
||||
!byte $27
|
||||
!byte $20
|
||||
!byte $1c
|
||||
!byte $14
|
||||
!byte $80
|
||||
!xor $80 {
|
||||
!text "HIGH escapes \\: \\\\ \\r \\n \\0 \\' \\t"
|
||||
}
|
||||
!byte $80
|
||||
|
||||
@L14DA nop
|
||||
rts
|
||||
|
||||
|
@@ -202,5 +202,50 @@
|
||||
.byte $f0,$f1,$f2,$f3,$f4,$f5,$f6,$f7,$f8,$f9,$fa,$fb,$fc,$fd,$fe
|
||||
.byte $ff
|
||||
|
||||
L144B: rts
|
||||
L144B: nop
|
||||
jmp @L14DA
|
||||
|
||||
.byte "ASCII escapes \: \\ \r \n \",$22," \' \t"
|
||||
.byte $80
|
||||
.byte $d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$45,$53,$43,$41,$50,$45,$53,$20
|
||||
.byte $5c
|
||||
.byte $3a,$20
|
||||
.byte $5c
|
||||
.byte $5c
|
||||
.byte $20
|
||||
.byte $5c
|
||||
.byte $52,$20
|
||||
.byte $5c
|
||||
.byte $4e,$20
|
||||
.byte $5c
|
||||
.byte $22,$20
|
||||
.byte $5c
|
||||
.byte $27,$20
|
||||
.byte $5c
|
||||
.byte $54
|
||||
.byte $80
|
||||
.byte $53,$43,$52,$20,$05,$13,$03,$01,$10,$05,$13,$20
|
||||
.byte $1c
|
||||
.byte $3a,$20
|
||||
.byte $1c
|
||||
.byte $1c
|
||||
.byte $20
|
||||
.byte $1c
|
||||
.byte $12,$20
|
||||
.byte $1c
|
||||
.byte $0e,$20
|
||||
.byte $1c
|
||||
.byte $22
|
||||
.byte $20
|
||||
.byte $1c
|
||||
.byte $27
|
||||
.byte $20
|
||||
.byte $1c
|
||||
.byte $14
|
||||
.byte $80
|
||||
HiAscii "HIGH escapes \: \\ \r \n \0 \' \t"
|
||||
.byte $80
|
||||
|
||||
@L14DA: nop
|
||||
rts
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# 6502bench SourceGen generated linker script for 20120-char-encoding-a
|
||||
MEMORY {
|
||||
MAIN: file=%O, start=%S, size=65536;
|
||||
# MEM000: file=%O, start=$1000, size=1100;
|
||||
# MEM000: file=%O, start=$1000, size=1244;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load=MAIN, type=rw;
|
||||
|
@@ -169,5 +169,50 @@
|
||||
asc "YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
|
||||
dfb $ff
|
||||
|
||||
L144B rts
|
||||
L144B nop
|
||||
jmp :L14DA
|
||||
|
||||
asc 'ASCII escapes \: \\ \r \n \" \',27,' \t'
|
||||
dfb $80
|
||||
hex d0c5d4d3c3c9c9204553434150455320
|
||||
dfb $5c
|
||||
hex 3a20
|
||||
dfb $5c
|
||||
dfb $5c
|
||||
dfb $20
|
||||
dfb $5c
|
||||
hex 5220
|
||||
dfb $5c
|
||||
hex 4e20
|
||||
dfb $5c
|
||||
hex 2220
|
||||
dfb $5c
|
||||
hex 2720
|
||||
dfb $5c
|
||||
dfb $54
|
||||
dfb $80
|
||||
hex 534352200513030110051320
|
||||
dfb $1c
|
||||
hex 3a20
|
||||
dfb $1c
|
||||
dfb $1c
|
||||
dfb $20
|
||||
dfb $1c
|
||||
hex 1220
|
||||
dfb $1c
|
||||
hex 0e20
|
||||
dfb $1c
|
||||
dfb $22
|
||||
dfb $20
|
||||
dfb $1c
|
||||
dfb $27
|
||||
dfb $20
|
||||
dfb $1c
|
||||
dfb $14
|
||||
dfb $80
|
||||
asc "HIGH escapes \: \\ \r \n \0 \' \t"
|
||||
dfb $80
|
||||
|
||||
:L14DA nop
|
||||
rts
|
||||
|
||||
|
@@ -295,5 +295,46 @@
|
||||
.byte $fe
|
||||
.byte $ff
|
||||
|
||||
L144B rts
|
||||
L144B nop
|
||||
jmp _L14DA
|
||||
|
||||
.enc "sg_ascii"
|
||||
.text "ASCII escapes \: \\ \r \n \",$22," \' \t"
|
||||
.byte $80
|
||||
.enc "none"
|
||||
.text "PETSCII escapes "
|
||||
.byte $5c
|
||||
.text ": "
|
||||
.byte $5c
|
||||
.byte $5c
|
||||
.byte ' '
|
||||
.byte $5c
|
||||
.text "r "
|
||||
.byte $5c
|
||||
.text "n "
|
||||
.byte $5c
|
||||
.text $22," "
|
||||
.byte $5c
|
||||
.text "' "
|
||||
.byte $5c
|
||||
.byte 't'
|
||||
.byte $80
|
||||
.text "scr ",$05
|
||||
.byte $13
|
||||
.byte $03
|
||||
.byte $01
|
||||
.byte $10
|
||||
.byte $05
|
||||
.byte $13
|
||||
.text " ",$1c,": ",$1c,$1c," ",$1c,$12," ",$1c
|
||||
.byte $0e
|
||||
.text " ",$1c,$22," ",$1c,"' ",$1c
|
||||
.byte $14
|
||||
.byte $80
|
||||
.enc "sg_hiascii"
|
||||
.text "HIGH escapes \: \\ \r \n \0 \' \t"
|
||||
.byte $80
|
||||
|
||||
_L14DA nop
|
||||
rts
|
||||
|
||||
|
@@ -266,5 +266,45 @@
|
||||
!byte $fe
|
||||
!byte $ff
|
||||
|
||||
L144B rts
|
||||
L144B nop
|
||||
jmp @L14DA
|
||||
|
||||
!text "ASCII escapes \\: \\\\ \\r \\n \\",$22," \\' \\t"
|
||||
!byte $80
|
||||
!pet "PETSCII escapes "
|
||||
!byte $5c
|
||||
!pet ": "
|
||||
!byte $5c
|
||||
!byte $5c
|
||||
!byte $20
|
||||
!byte $5c
|
||||
!pet "r "
|
||||
!byte $5c
|
||||
!pet "n "
|
||||
!byte $5c
|
||||
!pet $22," "
|
||||
!byte $5c
|
||||
!pet "' "
|
||||
!byte $5c
|
||||
!byte $54
|
||||
!byte $80
|
||||
!pet "scr ",$05
|
||||
!byte $13
|
||||
!byte $03
|
||||
!byte $01
|
||||
!byte $10
|
||||
!byte $05
|
||||
!byte $13
|
||||
!pet " ",$1c,": ",$1c,$1c," ",$1c,$12," ",$1c
|
||||
!byte $0e
|
||||
!pet " ",$1c,$22," ",$1c,"' ",$1c
|
||||
!byte $14
|
||||
!byte $80
|
||||
!xor $80 {
|
||||
!text "HIGH escapes \\: \\\\ \\r \\n \\0 \\' \\t"
|
||||
}
|
||||
!byte $80
|
||||
|
||||
@L14DA nop
|
||||
rts
|
||||
|
||||
|
@@ -295,5 +295,43 @@
|
||||
.byte $fe
|
||||
.byte $ff
|
||||
|
||||
L144B: rts
|
||||
L144B: nop
|
||||
jmp @L14DA
|
||||
|
||||
.byte "ASCII escapes \: \\ \r \n \",$22," \' \t"
|
||||
.byte $80
|
||||
.byte $d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$45,$53,$43,$41,$50,$45,$53,$20
|
||||
.byte $5c
|
||||
.byte $3a,$20
|
||||
.byte $5c
|
||||
.byte $5c
|
||||
.byte $20
|
||||
.byte $5c
|
||||
.byte $52,$20
|
||||
.byte $5c
|
||||
.byte $4e,$20
|
||||
.byte $5c
|
||||
.byte $22,$20
|
||||
.byte $5c
|
||||
.byte $27,$20
|
||||
.byte $5c
|
||||
.byte $54
|
||||
.byte $80
|
||||
.byte $53,$43,$52,$20,$05
|
||||
.byte $13
|
||||
.byte $03
|
||||
.byte $01
|
||||
.byte $10
|
||||
.byte $05
|
||||
.byte $13
|
||||
.byte $20,$1c,$3a,$20,$1c,$1c,$20,$1c,$12,$20,$1c
|
||||
.byte $0e
|
||||
.byte $20,$1c,$22,$20,$1c,$27,$20,$1c
|
||||
.byte $14
|
||||
.byte $80
|
||||
HiAscii "HIGH escapes \: \\ \r \n \0 \' \t"
|
||||
.byte $80
|
||||
|
||||
@L14DA: nop
|
||||
rts
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# 6502bench SourceGen generated linker script for 20130-char-encoding-p
|
||||
MEMORY {
|
||||
MAIN: file=%O, start=%S, size=65536;
|
||||
# MEM000: file=%O, start=$1000, size=1100;
|
||||
# MEM000: file=%O, start=$1000, size=1244;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load=MAIN, type=rw;
|
||||
|
@@ -263,5 +263,43 @@
|
||||
dfb $fe
|
||||
dfb $ff
|
||||
|
||||
L144B rts
|
||||
L144B nop
|
||||
jmp :L14DA
|
||||
|
||||
asc 'ASCII escapes \: \\ \r \n \" \',27,' \t'
|
||||
dfb $80
|
||||
hex d0c5d4d3c3c9c9204553434150455320
|
||||
dfb $5c
|
||||
hex 3a20
|
||||
dfb $5c
|
||||
dfb $5c
|
||||
dfb $20
|
||||
dfb $5c
|
||||
hex 5220
|
||||
dfb $5c
|
||||
hex 4e20
|
||||
dfb $5c
|
||||
hex 2220
|
||||
dfb $5c
|
||||
hex 2720
|
||||
dfb $5c
|
||||
dfb $54
|
||||
dfb $80
|
||||
hex 5343522005
|
||||
dfb $13
|
||||
dfb $03
|
||||
dfb $01
|
||||
dfb $10
|
||||
dfb $05
|
||||
dfb $13
|
||||
hex 201c3a201c1c201c12201c
|
||||
dfb $0e
|
||||
hex 201c22201c27201c
|
||||
dfb $14
|
||||
dfb $80
|
||||
asc "HIGH escapes \: \\ \r \n \0 \' \t"
|
||||
dfb $80
|
||||
|
||||
:L14DA nop
|
||||
rts
|
||||
|
||||
|
@@ -303,5 +303,54 @@
|
||||
.byte $fe
|
||||
.byte $ff
|
||||
|
||||
L144B rts
|
||||
L144B nop
|
||||
jmp _L14DA
|
||||
|
||||
.enc "sg_ascii"
|
||||
.text "ASCII escapes \: \\ \r \n \",$22," \' \t"
|
||||
.byte $80
|
||||
.enc "none"
|
||||
.text "PETSCII escapes "
|
||||
.byte $5c
|
||||
.text ": "
|
||||
.byte $5c
|
||||
.byte $5c
|
||||
.byte ' '
|
||||
.byte $5c
|
||||
.text "r "
|
||||
.byte $5c
|
||||
.text "n "
|
||||
.byte $5c
|
||||
.text $22," "
|
||||
.byte $5c
|
||||
.text "' "
|
||||
.byte $5c
|
||||
.byte 't'
|
||||
.byte $80
|
||||
.enc "screen"
|
||||
.text "SCR escapes "
|
||||
.byte $1c
|
||||
.text ": "
|
||||
.byte $1c
|
||||
.byte $1c
|
||||
.byte ' '
|
||||
.byte $1c
|
||||
.text "r "
|
||||
.byte $1c
|
||||
.text "n "
|
||||
.byte $1c
|
||||
.byte $22
|
||||
.byte ' '
|
||||
.byte $1c
|
||||
.byte $27
|
||||
.byte ' '
|
||||
.byte $1c
|
||||
.byte 't'
|
||||
.byte $80
|
||||
.enc "sg_hiascii"
|
||||
.text "HIGH escapes \: \\ \r \n \0 \' \t"
|
||||
.byte $80
|
||||
|
||||
_L14DA nop
|
||||
rts
|
||||
|
||||
|
@@ -275,5 +275,52 @@
|
||||
!byte $fe
|
||||
!byte $ff
|
||||
|
||||
L144B rts
|
||||
L144B nop
|
||||
jmp @L14DA
|
||||
|
||||
!text "ASCII escapes \\: \\\\ \\r \\n \\",$22," \\' \\t"
|
||||
!byte $80
|
||||
!pet "PETSCII escapes "
|
||||
!byte $5c
|
||||
!pet ": "
|
||||
!byte $5c
|
||||
!byte $5c
|
||||
!byte $20
|
||||
!byte $5c
|
||||
!pet "r "
|
||||
!byte $5c
|
||||
!pet "n "
|
||||
!byte $5c
|
||||
!pet $22," "
|
||||
!byte $5c
|
||||
!pet "' "
|
||||
!byte $5c
|
||||
!byte $54
|
||||
!byte $80
|
||||
!scr "SCR escapes "
|
||||
!byte $1c
|
||||
!scr ": "
|
||||
!byte $1c
|
||||
!byte $1c
|
||||
!byte $20
|
||||
!byte $1c
|
||||
!scr "r "
|
||||
!byte $1c
|
||||
!scr "n "
|
||||
!byte $1c
|
||||
!byte $22
|
||||
!byte $20
|
||||
!byte $1c
|
||||
!byte $27
|
||||
!byte $20
|
||||
!byte $1c
|
||||
!byte $14
|
||||
!byte $80
|
||||
!xor $80 {
|
||||
!text "HIGH escapes \\: \\\\ \\r \\n \\0 \\' \\t"
|
||||
}
|
||||
!byte $80
|
||||
|
||||
@L14DA nop
|
||||
rts
|
||||
|
||||
|
@@ -304,5 +304,50 @@
|
||||
.byte $fe
|
||||
.byte $ff
|
||||
|
||||
L144B: rts
|
||||
L144B: nop
|
||||
jmp @L14DA
|
||||
|
||||
.byte "ASCII escapes \: \\ \r \n \",$22," \' \t"
|
||||
.byte $80
|
||||
.byte $d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$45,$53,$43,$41,$50,$45,$53,$20
|
||||
.byte $5c
|
||||
.byte $3a,$20
|
||||
.byte $5c
|
||||
.byte $5c
|
||||
.byte $20
|
||||
.byte $5c
|
||||
.byte $52,$20
|
||||
.byte $5c
|
||||
.byte $4e,$20
|
||||
.byte $5c
|
||||
.byte $22,$20
|
||||
.byte $5c
|
||||
.byte $27,$20
|
||||
.byte $5c
|
||||
.byte $54
|
||||
.byte $80
|
||||
.byte $53,$43,$52,$20,$05,$13,$03,$01,$10,$05,$13,$20
|
||||
.byte $1c
|
||||
.byte $3a,$20
|
||||
.byte $1c
|
||||
.byte $1c
|
||||
.byte $20
|
||||
.byte $1c
|
||||
.byte $12,$20
|
||||
.byte $1c
|
||||
.byte $0e,$20
|
||||
.byte $1c
|
||||
.byte $22
|
||||
.byte $20
|
||||
.byte $1c
|
||||
.byte $27
|
||||
.byte $20
|
||||
.byte $1c
|
||||
.byte $14
|
||||
.byte $80
|
||||
HiAscii "HIGH escapes \: \\ \r \n \0 \' \t"
|
||||
.byte $80
|
||||
|
||||
@L14DA: nop
|
||||
rts
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# 6502bench SourceGen generated linker script for 20140-char-encoding-s
|
||||
MEMORY {
|
||||
MAIN: file=%O, start=%S, size=65536;
|
||||
# MEM000: file=%O, start=$1000, size=1100;
|
||||
# MEM000: file=%O, start=$1000, size=1244;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load=MAIN, type=rw;
|
||||
|
@@ -272,5 +272,50 @@
|
||||
dfb $fe
|
||||
dfb $ff
|
||||
|
||||
L144B rts
|
||||
L144B nop
|
||||
jmp :L14DA
|
||||
|
||||
asc 'ASCII escapes \: \\ \r \n \" \',27,' \t'
|
||||
dfb $80
|
||||
hex d0c5d4d3c3c9c9204553434150455320
|
||||
dfb $5c
|
||||
hex 3a20
|
||||
dfb $5c
|
||||
dfb $5c
|
||||
dfb $20
|
||||
dfb $5c
|
||||
hex 5220
|
||||
dfb $5c
|
||||
hex 4e20
|
||||
dfb $5c
|
||||
hex 2220
|
||||
dfb $5c
|
||||
hex 2720
|
||||
dfb $5c
|
||||
dfb $54
|
||||
dfb $80
|
||||
hex 534352200513030110051320
|
||||
dfb $1c
|
||||
hex 3a20
|
||||
dfb $1c
|
||||
dfb $1c
|
||||
dfb $20
|
||||
dfb $1c
|
||||
hex 1220
|
||||
dfb $1c
|
||||
hex 0e20
|
||||
dfb $1c
|
||||
dfb $22
|
||||
dfb $20
|
||||
dfb $1c
|
||||
dfb $27
|
||||
dfb $20
|
||||
dfb $1c
|
||||
dfb $14
|
||||
dfb $80
|
||||
asc "HIGH escapes \: \\ \r \n \0 \' \t"
|
||||
dfb $80
|
||||
|
||||
:L14DA nop
|
||||
rts
|
||||
|
||||
|
@@ -144,5 +144,20 @@ allbytes
|
||||
!hex e0e1e2e3e4e5e6e7e8e9eaebecedeeef
|
||||
!hex f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
|
||||
end
|
||||
end nop
|
||||
jmp skip_bs
|
||||
|
||||
!text "ASCII escapes \: \\ \r \n \",$22," \",$27," \t"
|
||||
!byte $80
|
||||
!pet "PETSCII escapes \: \\ \r \n \",$22," \",$27," \t"
|
||||
!byte $80
|
||||
!scr "SCR escapes \: \\ \r \n \",$22," \",$27," \t"
|
||||
!byte $80
|
||||
!xor $80 {
|
||||
; Can't include string delimiter due to code gen limitation. Do "\0" instead.
|
||||
!text "HIGH escapes \: \\ \r \n \",$30," \",$27," \t"
|
||||
}
|
||||
!byte $80
|
||||
|
||||
skip_bs nop
|
||||
rts
|
||||
|
Reference in New Issue
Block a user