1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-04-12 18:37:09 +00:00

Improve multi-encoding output in 64tass

Previously, we used the default character encoding from the project
properties to determine how strings and character constants in the
entire source file should be encoded.  Now we switch between
encodings as needed.  The default character encoding is no longer
relevant.

High ASCII is now an actual encoding, rather than acting like ASCII
that sometimes doesn't work.  Because we can do high ASCII character
operands with "| $80", we don't output a .enc to switch from ASCII
to high ASCII unless we need to generate a string.  (If we're
already in high ASCII mode, the "| $80" isn't required but won't
hurt anything.)

We now do a scan up front to see if ASCII or high ASCII is needed,
and only output the .cdefs for the encodings that are actually used.

The only gap in the matrix is high ASCII DCI strings -- the ".shift"
pseudo-op rejects text if the string doesn't start with the high
bit clear.
This commit is contained in:
Andy McFadden 2019-08-21 13:30:25 -07:00
parent 38d3adbb08
commit 32d1147eec
29 changed files with 424 additions and 283 deletions

View File

@ -318,6 +318,9 @@ namespace SourceGen.AsmGen {
return string.Empty; // indicate original is fine
}
// IGenerator
public void UpdateCharacterEncoding(FormatDescriptor dfd) { }
// IGenerator
public void GenerateShortSequence(int offset, int length, out string opcode,
out string operand) {

View File

@ -345,6 +345,9 @@ namespace SourceGen.AsmGen {
}
}
// IGenerator
public void UpdateCharacterEncoding(FormatDescriptor dfd) { }
// IGenerator
public void GenerateShortSequence(int offset, int length, out string opcode,
out string operand) {

View File

@ -365,6 +365,9 @@ namespace SourceGen.AsmGen {
return string.Empty;
}
// IGenerator
public void UpdateCharacterEncoding(FormatDescriptor dfd) { }
// IGenerator
public void GenerateShortSequence(int offset, int length, out string opcode,
out string operand) {

View File

@ -22,7 +22,6 @@ using System.Text;
using Asm65;
using CommonUtil;
using TextScanMode = SourceGen.ProjectProperties.AnalysisParameters.TextScanMode;
namespace SourceGen.AsmGen {
#region IGenerator
@ -44,6 +43,8 @@ namespace SourceGen.AsmGen {
/// </summary>
public class GenTass64 : IGenerator {
private const string ASM_FILE_SUFFIX = "_64tass.S"; // must start with underscore
private const string ASCII_ENC_NAME = "sg_ascii";
private const string HIGH_ASCII_ENC_NAME = "sg_hiascii";
private const int MAX_OPERAND_LEN = 64;
// IGenerator
@ -101,6 +102,11 @@ namespace SourceGen.AsmGen {
/// </summary>
private bool mNeedHereOp;
/// <summary>
/// What encoding are we currently set up for.
/// </summary>
private CharEncoding.Encoding mCurrentEncoding;
/// <summary>
/// Holds detected version of configured assembler.
/// </summary>
@ -203,28 +209,16 @@ namespace SourceGen.AsmGen {
GenCommon.ConfigureFormatterFromSettings(Settings, ref config);
SetFormatConfigValues(ref config);
// Configure delimiters for single-character operands. The conversion mode we
// use is determined by the default text mode in the project properties.
Formatter.DelimiterSet charSet = new Formatter.DelimiterSet();
TextScanMode textMode = Project.ProjectProps.AnalysisParams.DefaultTextScanMode;
switch (textMode) {
case TextScanMode.C64Petscii:
charSet.Set(CharEncoding.Encoding.C64Petscii,
Formatter.SINGLE_QUOTE_DELIM);
break;
case TextScanMode.C64ScreenCode:
charSet.Set(CharEncoding.Encoding.C64ScreenCode,
Formatter.SINGLE_QUOTE_DELIM);
break;
case TextScanMode.LowAscii:
case TextScanMode.LowHighAscii:
default:
charSet.Set(CharEncoding.Encoding.Ascii, Formatter.SINGLE_QUOTE_DELIM);
charSet.Set(CharEncoding.Encoding.HighAscii,
new Formatter.DelimiterDef(string.Empty, '\'', '\'', " | $80"));
break;
}
config.mCharDelimiters = charSet;
// Configure delimiters for single-character operands.
Formatter.DelimiterSet charDelimSet = new Formatter.DelimiterSet();
charDelimSet.Set(CharEncoding.Encoding.C64Petscii, Formatter.SINGLE_QUOTE_DELIM);
charDelimSet.Set(CharEncoding.Encoding.C64ScreenCode, Formatter.SINGLE_QUOTE_DELIM);
charDelimSet.Set(CharEncoding.Encoding.Ascii, Formatter.SINGLE_QUOTE_DELIM);
charDelimSet.Set(CharEncoding.Encoding.HighAscii,
new Formatter.DelimiterDef(string.Empty, '\'', '\'', " | $80"));
config.mCharDelimiters = charDelimSet;
SourceFormatter = new Formatter(config);
string msg = string.Format(Res.Strings.PROGRESS_GENERATING_FMT, pathName);
@ -276,34 +270,58 @@ namespace SourceGen.AsmGen {
OutputLine(string.Empty, SourceFormatter.FormatPseudoOp(".cpu"),
'\"' + cpuStr + '\"', string.Empty);
TextScanMode textMode = Project.ProjectProps.AnalysisParams.DefaultTextScanMode;
switch (textMode) {
case TextScanMode.C64Petscii:
// With "--ascii", this is the default.
//OutputLine(string.Empty, ".enc", "sg_petscii", string.Empty);
//OutputLine(string.Empty, ".cdef", "\" @\", $20", string.Empty);
//OutputLine(string.Empty, ".cdef", "\"AZ\", $c1", string.Empty);
//OutputLine(string.Empty, ".cdef", "\"az\", $41", string.Empty);
//OutputLine(string.Empty, ".cdef", "\"[[\", $5b", string.Empty);
//OutputLine(string.Empty, ".cdef", "\"]]\", $5d", string.Empty);
break;
case TextScanMode.C64ScreenCode:
// With "--ascii", we can use the built-in screen encoding.
OutputLine(string.Empty, ".enc", "screen", string.Empty);
//OutputLine(string.Empty, ".enc", "sg_screen", string.Empty);
//OutputLine(string.Empty, ".cdef", "\" ?\", $20", string.Empty);
//OutputLine(string.Empty, ".cdef", "\"@@\", $00", string.Empty);
//OutputLine(string.Empty, ".cdef", "\"AZ\", $41", string.Empty);
//OutputLine(string.Empty, ".cdef", "\"az\", $01", string.Empty);
//OutputLine(string.Empty, ".cdef", "\"[[\", $1b", string.Empty);
//OutputLine(string.Empty, ".cdef", "\"]]\", $1d", string.Empty);
break;
case TextScanMode.LowAscii:
case TextScanMode.LowHighAscii:
// C64 PETSCII and C64 screen codes are built in. Define ASCII if we also
// need that.
mCurrentEncoding = CharEncoding.Encoding.C64Petscii;
CheckAsciiFormats(out bool hasAscii, out bool hasHighAscii);
if (hasHighAscii) {
OutputLine(string.Empty, ".enc", HIGH_ASCII_ENC_NAME, string.Empty);
OutputLine(string.Empty, ".cdef", "$20,$7e,$a0", string.Empty);
mCurrentEncoding = CharEncoding.Encoding.HighAscii;
}
if (hasAscii) {
OutputLine(string.Empty, ".enc", ASCII_ENC_NAME, string.Empty);
OutputLine(string.Empty, ".cdef", "$20,$7e,$20", string.Empty);
mCurrentEncoding = CharEncoding.Encoding.Ascii;
}
}
private void CheckAsciiFormats(out bool hasAscii, out bool hasHighAscii) {
int offset = 0;
hasAscii = hasHighAscii = false;
while (offset < Project.FileData.Length) {
Anattrib attr = Project.GetAnattrib(offset);
FormatDescriptor dfd = attr.DataDescriptor;
if (dfd != null) {
if (dfd.FormatSubType == FormatDescriptor.SubType.Ascii) {
Debug.Assert(dfd.IsNumeric || dfd.IsString);
hasAscii = true;
} else if (dfd.FormatSubType == FormatDescriptor.SubType.HighAscii) {
hasHighAscii = true;
}
}
if (hasAscii && hasHighAscii) {
return;
}
offset += attr.Length;
}
}
private CharEncoding.Encoding FormatDescriptorToCharEncoding(FormatDescriptor dfd) {
switch (dfd.FormatSubType) {
case FormatDescriptor.SubType.Ascii:
return CharEncoding.Encoding.Ascii;
case FormatDescriptor.SubType.HighAscii:
return CharEncoding.Encoding.HighAscii;
case FormatDescriptor.SubType.C64Petscii:
return CharEncoding.Encoding.C64Petscii;
case FormatDescriptor.SubType.C64Screen:
return CharEncoding.Encoding.C64ScreenCode;
case FormatDescriptor.SubType.ASCII_GENERIC:
default:
OutputLine(string.Empty, ".enc", "sg_ascii", string.Empty);
OutputLine(string.Empty, ".cdef", "$20,$7e,$20", string.Empty);
break;
return CharEncoding.Encoding.Unknown;
}
}
@ -338,6 +356,43 @@ namespace SourceGen.AsmGen {
return string.Empty; // indicate original is fine
}
// IGenerator
public void UpdateCharacterEncoding(FormatDescriptor dfd) {
CharEncoding.Encoding newEnc = FormatDescriptorToCharEncoding(dfd);
if (newEnc == CharEncoding.Encoding.Unknown) {
// probably not a character operand
return;
}
if (newEnc != mCurrentEncoding) {
switch (newEnc) {
case CharEncoding.Encoding.Ascii:
OutputLine(string.Empty, ".enc", ASCII_ENC_NAME, string.Empty);
break;
case CharEncoding.Encoding.HighAscii:
// If this is a numeric operand (not string), and we're currently in
// ASCII mode, the "| $80" in the delimiter will handle this without
// the need for a .enc. Much less clutter for sources that have plain
// ASCII strings but test high ASCII constants.
if (mCurrentEncoding == CharEncoding.Encoding.Ascii && !dfd.IsString) {
newEnc = mCurrentEncoding;
} else {
OutputLine(string.Empty, ".enc", HIGH_ASCII_ENC_NAME, string.Empty);
}
break;
case CharEncoding.Encoding.C64Petscii:
OutputLine(string.Empty, ".enc", "none", string.Empty);
break;
case CharEncoding.Encoding.C64ScreenCode:
OutputLine(string.Empty, ".enc", "screen", string.Empty);
break;
default:
Debug.Assert(false);
break;
}
mCurrentEncoding = newEnc;
}
}
// IGenerator
public void GenerateShortSequence(int offset, int length, out string opcode,
out string operand) {
@ -389,6 +444,7 @@ namespace SourceGen.AsmGen {
case FormatDescriptor.Type.NumericLE:
opcodeStr = sDataOpNames.GetDefineData(length);
operand = RawData.GetWord(data, offset, length, false);
UpdateCharacterEncoding(dfd);
operandStr = PseudoOp.FormatNumericOperand(formatter, Project.SymbolTable,
mLocalizer.LabelMap, dfd, operand, length,
PseudoOp.FormatNumericOpFlags.None);
@ -399,6 +455,7 @@ namespace SourceGen.AsmGen {
// Nothing defined, output as comma-separated single-byte values.
GenerateShortSequence(offset, length, out opcodeStr, out operandStr);
} else {
UpdateCharacterEncoding(dfd);
operand = RawData.GetWord(data, offset, length, true);
operandStr = PseudoOp.FormatNumericOperand(formatter, Project.SymbolTable,
mLocalizer.LabelMap, dfd, operand, length,
@ -587,31 +644,25 @@ namespace SourceGen.AsmGen {
Debug.Assert(dfd.IsString);
Debug.Assert(dfd.Length > 0);
TextScanMode textMode = Project.ProjectProps.AnalysisParams.DefaultTextScanMode;
CharEncoding.Convert charConv = null;
CharEncoding.Convert dciConv = null;
switch (dfd.FormatSubType) {
case FormatDescriptor.SubType.Ascii:
if (textMode == TextScanMode.LowAscii ||
textMode == TextScanMode.LowHighAscii) {
charConv = CharEncoding.ConvertAscii;
dciConv = CharEncoding.ConvertLowAndHighAscii;
}
break;
case FormatDescriptor.SubType.C64Petscii:
if (textMode == TextScanMode.C64Petscii) {
charConv = CharEncoding.ConvertC64Petscii;
dciConv = CharEncoding.ConvertLowAndHighC64Petscii;
}
break;
case FormatDescriptor.SubType.C64Screen:
if (textMode == TextScanMode.C64ScreenCode) {
charConv = CharEncoding.ConvertC64ScreenCode;
dciConv = CharEncoding.ConvertLowAndHighC64ScreenCode;
}
charConv = CharEncoding.ConvertAscii;
dciConv = CharEncoding.ConvertLowAndHighAscii;
break;
case FormatDescriptor.SubType.HighAscii:
// not supported
charConv = CharEncoding.ConvertHighAscii;
dciConv = CharEncoding.ConvertLowAndHighAscii;
break;
case FormatDescriptor.SubType.C64Petscii:
charConv = CharEncoding.ConvertC64Petscii;
dciConv = CharEncoding.ConvertLowAndHighC64Petscii;
break;
case FormatDescriptor.SubType.C64Screen:
charConv = CharEncoding.ConvertC64ScreenCode;
dciConv = CharEncoding.ConvertLowAndHighC64ScreenCode;
break;
default:
break;
}
@ -620,6 +671,9 @@ namespace SourceGen.AsmGen {
return;
}
// Issue a .enc, if needed.
UpdateCharacterEncoding(dfd);
Formatter formatter = SourceFormatter;
byte[] data = Project.FileData;
int hiddenLeadingBytes = 0;
@ -646,6 +700,12 @@ namespace SourceGen.AsmGen {
break;
case FormatDescriptor.Type.StringDci:
opcodeStr = sDataOpNames.StrDci;
if ((Project.FileData[offset] & 0x80) != 0) {
// ".shift" directive only works for strings where the low bit starts
// clear and ends high.
OutputNoJoy(offset, dfd.Length, labelStr, commentStr);
return;
}
break;
default:
Debug.Assert(false);

View File

@ -237,6 +237,9 @@ namespace SourceGen.AsmGen {
string hash = gen.Quirks.BlockMoveArgsNoHash ? "" : "#";
formattedOperand = hash + opstr1 + "," + hash + opstr2;
} else {
if (attr.DataDescriptor.IsStringOrCharacter) {
gen.UpdateCharacterEncoding(attr.DataDescriptor);
}
formattedOperand = PseudoOp.FormatNumericOperand(formatter, proj.SymbolTable,
gen.Localizer.LabelMap, attr.DataDescriptor,
operandForSymbol, operandLen, opFlags);

View File

@ -95,6 +95,16 @@ namespace SourceGen.AsmGen {
/// null if the op is unsupported or broken and should be emitted as hex.</returns>
string ModifyOpcode(int offset, OpDef op);
/// <summary>
/// Allows the generator to issue character encoding update instructions for source
/// files with more than one encoding.
/// </summary>
/// <remarks>
/// This may be called for non-character numeric descriptors.
/// </remarks>
/// <param name="dfd">Format descriptor for character or string.</param>
void UpdateCharacterEncoding(FormatDescriptor dfd);
/// <summary>
/// Generates an opcode/operand pair for a short sequence of bytes (1-4 bytes).
/// Does not produce any source output.

View File

@ -295,6 +295,24 @@ namespace SourceGen {
}
}
/// <summary>
/// True if the FormatDescriptor is a string or character.
/// </summary>
public bool IsStringOrCharacter {
get {
switch (FormatSubType) {
case SubType.ASCII_GENERIC:
case SubType.Ascii:
case SubType.HighAscii:
case SubType.C64Petscii:
case SubType.C64Screen:
return true;
default:
return false;
}
}
}
/// <summary>
/// True if the FormatDescriptor has a symbol or is Numeric/Address.
/// </summary>

View File

@ -129,7 +129,12 @@ same value.</p>
data you have selected is in the appropriate format. For example,
"Null-terminated strings" is only enabled if the data regions are
composed entirely of characters followed by $00. Zero-length strings
are allowed, but only if some non-zero-length strings are present.</p>
are allowed, but only if some non-zero-length strings are present.
DCI (Dextral Character Inverted) strings have the high bit on the last
byte flipped; for PETSCII this will usually look like a series of
lower-case letters followed by a capital letter, but may look odd if the
last character is punctuation (e.g. '!' becomes $A1, which is a
rectangle character that SourceGen will only display as hex).</p>
<p>The character encoding can be selected, offering a choice between
plain ASCII, low + high ASCII, C64 PETSCII, and C64 screen codes. When
you change the encoding, your available options may change. The
@ -137,7 +142,7 @@ low + high ASCII setting will accept both, configuring the appropriate
encoding based on the data values, but when identifying multiple strings
it requires that each individual string be entirely one or the other.</p>
<p>Due to fundamental limitations of the character set, C64 screen code
strings cannot be null terminated.</p>
strings cannot be null terminated ($00 is '@').</p>
<p>To avoid burying a label in the middle of a data item, contiguous areas
are split at labels. This can sometimes have unexpected effects. For

View File

@ -1,6 +1,4 @@
.cpu "65816"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
.as
.xs

View File

@ -1,6 +1,4 @@
.cpu "65816"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
.as
.xs

View File

@ -1,6 +1,4 @@
.cpu "65816"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
.as
.xs

View File

@ -1,6 +1,4 @@
.cpu "65816"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
.as
.xs

View File

@ -1,6 +1,4 @@
.cpu "6502i"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
jsr L1035
jsr L1038

View File

@ -1,6 +1,4 @@
.cpu "6502i"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
jsr L1035
jsr L1038

View File

@ -1,6 +1,4 @@
.cpu "65c02"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
jsr L1014
jsr L108A

View File

@ -1,6 +1,4 @@
.cpu "65c02"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
jsr L1014
jsr L108A

View File

@ -1,7 +1,5 @@
;Project file was edited to get all big-endian data types.
.cpu "6502"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
rts

View File

@ -1,5 +1,7 @@
;Project file was edited to get zero-length strings and reverse DCI.
.cpu "6502"
.enc sg_hiascii
.cdef $20,$7e,$a0
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
@ -7,13 +9,16 @@
.text "low ASCII str"
.byte $80
.byte $e8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$f3,$f4,$f2
.enc sg_hiascii
.text "high ASCII str"
.byte $80
.enc sg_ascii
.text "'low'quoted",$22,"''text"
.byte $80
.byte $a2,$e8,$e9,$e7,$e8,$a2,$f1,$f5,$ef,$f4,$e5,$e4,$a7,$a2,$a2,$f4
.byte $e5,$f8,$f4
.enc sg_hiascii
.text $a2,"high",$a2,"quoted'",$a2,$a2,"text"
.byte $80
.enc sg_ascii
.text "01234567890123456789012345678901234567890123456789012345678901"
.text "234567890123456789"
.byte $80
@ -45,14 +50,19 @@
.text "0123456789012345678901234567890123456789012345678901678901",$22
.text $22,$22
.byte $81
.fill 62,$aa
.enc sg_hiascii
.text "**************************************************************"
.byte $80
.fill 96,$aa
.text "**************************************************************"
.text "**********************************"
.byte $81
.enc sg_ascii
.text "ver IICSA wol"
.byte $80
.byte $f6,$e5,$f2,$a0,$c9,$c9,$c3,$d3,$c1,$a0,$e8,$e7,$e9,$e8
.enc sg_hiascii
.text "ver IICSA hgih"
.byte $80
.enc sg_ascii
.text ".eeht rof sllot ti ;sllot lleb eht mohw rof wonk ot dnes reven"
.text " erofereht dna ,dniknam ni devlovni ma I esuaceb ,em sehsinimi"
.text "d htaed snam ynA .erew nwo eniht fo ro sdneirf yht fo ronam a"
@ -65,13 +75,16 @@
.byte $80
.null "low ASCII strz"
.byte $80
.byte $e8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$f3,$f4,$f2,$fa,$00
.enc sg_hiascii
.null "high ASCII strz"
.byte $80
.enc sg_ascii
.null "'low'quoted",$22,"''text"
.byte $80
.byte $a2,$e8,$e9,$e7,$e8,$a2,$f1,$f5,$ef,$f4,$e5,$e4,$a7,$a2,$a2,$f4
.byte $e5,$f8,$f4,$00
.enc sg_hiascii
.null $a2,"high",$a2,"quoted'",$a2,$a2,"text"
.byte $80
.enc sg_ascii
.text "012345678901234567890123456789012345678901234567890123456789''"
.text "'",$00
.byte $80
@ -82,13 +95,16 @@
.byte $80
.ptext "low ASCII str1"
.byte $80
.byte $0f,$e8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$f3,$f4,$f2,$b1
.enc sg_hiascii
.ptext "high ASCII str1"
.byte $80
.enc sg_ascii
.ptext "'low'quoted",$22,"''text"
.byte $80
.byte $13,$a2,$e8,$e9,$e7,$e8,$a2,$f1,$f5,$ef,$f4,$e5,$e4,$a7,$a2,$a2
.byte $f4,$e5,$f8,$f4
.enc sg_hiascii
.ptext $a2,"high",$a2,"quoted'",$a2,$a2,"text"
.byte $80
.enc sg_ascii
.text $3f,"0123456789012345678901234567890123456789012345678901234567"
.text "89'''"
.byte $80
@ -99,14 +115,16 @@
.byte $80
.text $0e,$00,"low ASCII str2"
.byte $80
.byte $0f,$00,$e8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$f3,$f4,$f2
.byte $b2
.enc sg_hiascii
.text $0f,$00,"high ASCII str2"
.byte $80
.enc sg_ascii
.text $12,$00,"'low'quoted",$22,"''text"
.byte $80
.byte $13,$00,$a2,$e8,$e9,$e7,$e8,$a2,$f1,$f5,$ef,$f4,$e5,$e4,$a7,$a2
.byte $a2,$f4,$e5,$f8,$f4
.enc sg_hiascii
.text $13,$00,$a2,"high",$a2,"quoted'",$a2,$a2,"text"
.byte $80
.enc sg_ascii
.text $3f,$00,"012345678901234567890123456789012345678901234567890123"
.text "456789'''"
.byte $80
@ -123,13 +141,17 @@
.byte $81
.shift "low ASCII dci"
.byte $80
.enc sg_hiascii
.byte $e8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$e4,$e3,$69
.byte $80
.enc sg_ascii
.shift "'low'quoted",$22,"''text"
.byte $80
.enc sg_hiascii
.byte $a2,$e8,$e9,$e7,$e8,$a2,$f1,$f5,$ef,$f4,$e5,$e4,$a7,$a2,$a2,$f4
.byte $e5,$f8,$74
.byte $80
.enc sg_ascii
.text "012345678901234567890123456789012345678901234567890123456789''"
.text $a7
.byte $80

View File

@ -1,5 +1,7 @@
;Project file was edited for some ASCII operands.
.cpu "65816"
.enc sg_hiascii
.cdef $20,$7e,$a0
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000

View File

@ -1,6 +1,4 @@
.cpu "65816"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
.as
.xs

View File

@ -1,6 +1,4 @@
.cpu "65816"
.enc sg_ascii
.cdef $20,$7e,$20
longsym = $123456
* = $1000

View File

@ -1,6 +1,4 @@
.cpu "6502"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
.byte $03
.byte $02

View File

@ -1,6 +1,4 @@
.cpu "65816"
.enc sg_ascii
.cdef $20,$7e,$20
REALLYLONGLABELNAME = $8888 ;that's a long name
* = $1000

View File

@ -14,8 +14,6 @@
;* *
;***************************************
.cpu "6502"
.enc sg_ascii
.cdef $20,$7e,$20
plataddr = $3000 ;address only in platform file
;Short, unboxed comment here!!

View File

@ -1,7 +1,5 @@
;6502bench SourceGen v1.1.0-dev1
.cpu "65816"
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
.as
.xs

View File

@ -1,6 +1,4 @@
.cpu "6502"
.enc sg_ascii
.cdef $20,$7e,$20
* = $0000
nop
nop

View File

@ -1,5 +1,7 @@
;Project edited to mark some non-ASCII operands as ASCII.
.cpu "65816"
.enc sg_hiascii
.cdef $20,$7e,$a0
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
@ -10,123 +12,133 @@
sep #$30
lda #'A'
lda #'A' | $80
lda #$c1
lda #$41
.enc none
lda #'A'
.enc screen
lda #'A'
.enc sg_ascii
ldx #'a'
ldx #'a' | $80
ldx #$41
ldx #$01
.enc none
ldx #'a'
.enc screen
ldx #'a'
.enc sg_ascii
lda #$7f
lda #$7f
.enc none
lda #$7f
.enc screen
lda #$7f
.enc sg_ascii
lda #$0d
rep #$30
.al
.xl
lda #'B'
lda #'B' | $80
lda #$c2
lda #$42
.enc none
lda #'B'
.enc screen
lda #'B'
sep #$30
.as
.xs
rts
.enc sg_ascii
.byte 'C'
.byte 'C' | $80
.byte $c3
.byte $43
.enc none
.byte 'C'
.enc screen
.byte 'C'
.enc sg_ascii
.word 'd'
.word 'd' | $80
.word $44
.word $04
.enc none
.word 'd'
.enc screen
.word 'd'
.byte $00,$45
.byte $00,$c5
.byte $00,$c5
.byte $00,$45
.byte $80
.enc sg_ascii
.text "low ASCII str"
.byte $e8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$f3,$f4,$f2
.enc sg_hiascii
.text "high ASCII str"
.byte $80
.byte $d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$53,$54,$52
.enc none
.text "PETSCII str"
.byte $80
.byte $53,$03,$12,$05,$05,$0e,$20,$43,$0f,$04,$05,$20,$13,$14,$12
.enc screen
.text "Screen Code str"
.byte $82
.enc sg_ascii
.text $07,"Low ASCII CRLF",$0d,$0a
.byte $82
.byte $87,$c8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$c3,$d2,$cc,$c6
.byte $8d,$8a
.enc sg_hiascii
.text $87,"High ASCII CRLF",$8d,$8a
.byte $82
.byte $93,$d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$57,$49,$54,$48,$20,$96,$43
.byte $4f,$4e,$54,$52,$4f,$4c,$05,$20,$43,$4f,$44,$45,$53,$0d
.enc none
.text $93,"PETSCII with ",$96,"control",$05," codes",$0d
.byte $83
.enc sg_ascii
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.byte $a0,$a1,$a2,$a3,$a4,$a5,$a6,$a7,$a8,$a9,$aa,$ab,$ac,$ad,$ae,$af
.byte $b0,$b1,$b2,$b3,$b4,$b5,$b6,$b7,$b8,$b9,$ba,$bb,$bc,$bd,$be,$bf
.byte $c0,$c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$ca,$cb,$cc,$cd,$ce,$cf
.byte $d0,$d1,$d2,$d3,$d4,$d5,$d6,$d7,$d8,$d9,$da,$db,$dc,$dd,$de,$df
.byte $e0,$e1,$e2,$e3,$e4,$e5,$e6,$e7,$e8,$e9,$ea,$eb,$ec,$ed,$ee,$ef
.byte $f0,$f1,$f2,$f3,$f4,$f5,$f6,$f7,$f8,$f9,$fa,$fb,$fc,$fd,$fe
.enc sg_hiascii
.text " !",$a2,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.byte $20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2a,$2b,$2c,$2d,$2e,$2f
.byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$3e,$3f
.byte $40,$c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$ca,$cb,$cc,$cd,$ce,$cf
.byte $d0,$d1,$d2,$d3,$d4,$d5,$d6,$d7,$d8,$d9,$da,$5b
.enc none
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $5c
.byte $5d
.byte ']'
.byte $5e
.byte $5f
.byte $60
.byte $41,$42,$43,$44,$45,$46,$47,$48,$49,$4a,$4b,$4c,$4d,$4e,$4f,$50
.byte $51,$52,$53,$54,$55,$56,$57,$58,$59,$5a
.text "abcdefghijklmnopqrstuvwxyz"
.enc sg_ascii
.text "{|}~"
.byte $83
.byte $20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2a,$2b,$2c,$2d,$2e,$2f
.byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$3e,$3f
.byte $00,$41,$42,$43,$44,$45,$46,$47,$48,$49,$4a,$4b,$4c,$4d,$4e,$4f
.byte $50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$5a,$1b
.enc screen
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $1c
.byte $1d
.byte ']'
.byte $1e
.byte $1f
.byte $40
.byte $01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0d,$0e,$0f,$10
.byte $11,$12,$13,$14,$15,$16,$17,$18,$19,$1a
.text "abcdefghijklmnopqrstuvwxyz"
.enc sg_ascii
.text "{|}~"
.byte $84
.byte $c9,$c9,$c3,$d3,$d4,$c5,$d0,$20,$45,$53,$52,$45,$56,$45,$52
.enc none
.text "IICSTEP esrever"
.byte $84
.byte $4e,$55,$4c,$4c,$20,$54,$45,$52,$4d,$20,$d0,$c5,$d4,$d3,$c3,$c9
.byte $c9,$00
.null "null term PETSCII"
.byte $84
.byte $d4,$48,$49,$53,$20,$4e,$55,$4c,$4c,$2d,$54,$45,$52,$4d,$49,$4e
.byte $41,$54,$45,$44,$20,$53,$54,$52,$49,$4e,$47,$20,$49,$53,$20,$54
.byte $4f,$4f,$20,$4c,$4f,$4e,$47,$20,$54,$4f,$20,$46,$49,$54,$20,$4f
.byte $4e,$20,$41,$20,$53,$49,$4e,$47,$4c,$45,$20,$4c,$49,$4e,$45,$2c
.byte $20,$41,$4e,$44,$20,$57,$49,$4c,$4c,$20,$42,$45,$20,$53,$50,$4c
.byte $49,$54,$2e,$00
.text "This null-terminated string is too long to fit on a single lin"
.text "e, and will be split.",$00
.byte $84
.byte $13,$d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$57,$49,$54,$48,$20,$4c,$45
.byte $4e,$47,$54,$48
.ptext "PETSCII with length"
.byte $84
.byte $14,$00,$d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$57,$49,$54,$48,$20,$4c
.byte $45,$4e,$47,$54,$48,$32
.text $14,$00,"PETSCII with length2"
.byte $84
.byte $50,$45,$54,$20,$44,$43,$c9
.shift "pet dci"
.byte $84
.byte $05,$04,$0f,$43,$20,$0e,$05,$05,$12,$03,$53,$20,$05,$13,$12,$05
.byte $16,$05,$12
.enc screen
.text "edoC neercS esrever"
.byte $84
.byte $17,$53,$03,$12,$05,$05,$0e,$20,$43,$0f,$04,$05,$20,$17,$09,$14
.byte $08,$20,$0c,$05,$0e,$07,$14,$08
.ptext "Screen Code with length"
.byte $84
.byte $18,$00,$53,$03,$12,$05,$05,$0e,$20,$43,$0f,$04,$05,$20,$17,$09
.byte $14,$08,$20,$0c,$05,$0e,$07,$14,$08,$32
.text $18,$00,"Screen Code with length2"
.byte $84
.byte $53,$03,$12,$05,$05,$0e,$20,$43,$0f,$04,$05,$20,$44,$43,$c9
.shift "Screen Code DCI"
.byte $84
.byte $85
;$00-ff block
@ -162,6 +174,7 @@
.byte $1d
.byte $1e
.byte $1f
.enc sg_ascii
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $7f

View File

@ -1,78 +1,99 @@
;Project edited to mark some non-ASCII operands as ASCII.
.cpu "65816"
.enc sg_hiascii
.cdef $20,$7e,$a0
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
.as
.xs
clc
xce
sep #$30
lda #$41
lda #$c1
lda #'A'
lda #$41
ldx #$61
ldx #$e1
lda #'A' | $80
.enc none
lda #'A'
.enc screen
lda #'A'
.enc sg_ascii
ldx #'a'
ldx #$01
ldx #'a' | $80
.enc none
ldx #'a'
.enc screen
ldx #'a'
.enc sg_ascii
lda #$7f
lda #$7f
.enc none
lda #$7f
.enc screen
lda #$7f
.enc sg_ascii
lda #$0d
rep #$30
.al
.xl
lda #$42
lda #$c2
lda #'B'
lda #$42
lda #'B' | $80
.enc none
lda #'B'
.enc screen
lda #'B'
sep #$30
.as
.xs
rts
.byte $43
.byte $c3
.enc sg_ascii
.byte 'C'
.byte $43
.word $64
.word $e4
.byte 'C' | $80
.enc none
.byte 'C'
.enc screen
.byte 'C'
.enc sg_ascii
.word 'd'
.word 'd' | $80
.enc none
.word 'd'
.enc screen
.word 'd'
.word $04
.byte $00,$45
.byte $00,$c5
.byte $00,$c5
.byte $00,$45
.byte $80
.byte $6c,$6f,$77,$20,$41,$53,$43,$49,$49,$20,$73,$74,$72
.byte $e8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$f3,$f4,$f2
.enc sg_ascii
.text "low ASCII str"
.enc sg_hiascii
.text "high ASCII str"
.byte $80
.enc none
.text "PETSCII str"
.byte $80
.byte $53,$03,$12,$05,$05,$0e,$20,$43,$0f,$04,$05,$20,$13,$14,$12
.enc screen
.text "Screen Code str"
.byte $82
.byte $07,$4c,$6f,$77,$20,$41,$53,$43,$49,$49,$20,$43,$52,$4c,$46,$0d
.byte $0a
.enc sg_ascii
.text $07,"Low ASCII CRLF",$0d,$0a
.byte $82
.byte $87,$c8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$c3,$d2,$cc,$c6
.byte $8d,$8a
.enc sg_hiascii
.text $87,"High ASCII CRLF",$8d,$8a
.byte $82
.enc none
.text $93,"PETSCII with ",$96,"control",$05," codes",$0d
.byte $83
.byte $20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2a,$2b,$2c,$2d,$2e,$2f
.byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$3e,$3f
.byte $40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$4a,$4b,$4c,$4d,$4e,$4f
.byte $50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$5a,$5b,$5c,$5d,$5e,$5f
.byte $60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$6a,$6b,$6c,$6d,$6e,$6f
.byte $70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$7a,$7b,$7c,$7d,$7e
.enc sg_ascii
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.byte $a0,$a1,$a2,$a3,$a4,$a5,$a6,$a7,$a8,$a9,$aa,$ab,$ac,$ad,$ae,$af
.byte $b0,$b1,$b2,$b3,$b4,$b5,$b6,$b7,$b8,$b9,$ba,$bb,$bc,$bd,$be,$bf
.byte $c0,$c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$ca,$cb,$cc,$cd,$ce,$cf
.byte $d0,$d1,$d2,$d3,$d4,$d5,$d6,$d7,$d8,$d9,$da,$db,$dc,$dd,$de,$df
.byte $e0,$e1,$e2,$e3,$e4,$e5,$e6,$e7,$e8,$e9,$ea,$eb,$ec,$ed,$ee,$ef
.byte $f0,$f1,$f2,$f3,$f4,$f5,$f6,$f7,$f8,$f9,$fa,$fb,$fc,$fd,$fe
.enc sg_hiascii
.text " !",$a2,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.enc none
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $5c
@ -86,22 +107,21 @@
.byte $7d
.byte $7e
.byte $83
.byte $20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2a,$2b,$2c,$2d,$2e,$2f
.byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$3e,$3f
.byte $00,$41,$42,$43,$44,$45,$46,$47,$48,$49,$4a,$4b,$4c,$4d,$4e,$4f
.byte $50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$5a,$1b
.enc screen
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $1c
.byte $1d
.byte ']'
.byte $1e
.byte $1f
.byte $40
.byte $01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0d,$0e,$0f,$10
.byte $11,$12,$13,$14,$15,$16,$17,$18,$19,$1a
.text "abcdefghijklmnopqrstuvwxyz"
.byte $7b
.byte $7c
.byte $7d
.byte $7e
.byte $84
.enc none
.text "IICSTEP esrever"
.byte $84
.null "null term PETSCII"
@ -115,16 +135,14 @@
.byte $84
.shift "pet dci"
.byte $84
.byte $05,$04,$0f,$43,$20,$0e,$05,$05,$12,$03,$53,$20,$05,$13,$12,$05
.byte $16,$05,$12
.enc screen
.text "edoC neercS esrever"
.byte $84
.byte $17,$53,$03,$12,$05,$05,$0e,$20,$43,$0f,$04,$05,$20,$17,$09,$14
.byte $08,$20,$0c,$05,$0e,$07,$14,$08
.ptext "Screen Code with length"
.byte $84
.byte $18,$00,$53,$03,$12,$05,$05,$0e,$20,$43,$0f,$04,$05,$20,$17,$09
.byte $14,$08,$20,$0c,$05,$0e,$07,$14,$08,$32
.text $18,$00,"Screen Code with length2"
.byte $84
.byte $53,$03,$12,$05,$05,$0e,$20,$43,$0f,$04,$05,$20,$44,$43,$c9
.shift "Screen Code DCI"
.byte $84
.byte $85
;$00-ff block
@ -158,6 +176,7 @@
.byte $1b
.byte $1c
.byte $1d
.enc none
.text $1e,$1f," !",$22,"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmno"
.text "pqrstuvwxyz["
.byte $5c

View File

@ -1,96 +1,113 @@
;Project edited to mark some non-ASCII operands as ASCII.
.cpu "65816"
.enc screen
.enc sg_hiascii
.cdef $20,$7e,$a0
.enc sg_ascii
.cdef $20,$7e,$20
* = $1000
.as
.xs
clc
xce
sep #$30
lda #$41
lda #$c1
lda #$c1
lda #'A'
ldx #$61
ldx #$e1
ldx #$41
lda #'A' | $80
.enc none
lda #'A'
.enc screen
lda #'A'
.enc sg_ascii
ldx #'a'
ldx #'a' | $80
.enc none
ldx #'a'
.enc screen
ldx #'a'
.enc sg_ascii
lda #$7f
lda #$7f
.enc none
lda #$7f
.enc screen
lda #$7f
.enc sg_ascii
lda #$0d
rep #$30
.al
.xl
lda #$42
lda #$c2
lda #$c2
lda #'B'
lda #'B' | $80
.enc none
lda #'B'
.enc screen
lda #'B'
sep #$30
.as
.xs
rts
.byte $43
.byte $c3
.byte $c3
.enc sg_ascii
.byte 'C'
.word $64
.word $e4
.word $44
.byte 'C' | $80
.enc none
.byte 'C'
.enc screen
.byte 'C'
.enc sg_ascii
.word 'd'
.word 'd' | $80
.enc none
.word 'd'
.enc screen
.word 'd'
.byte $00,$45
.byte $00,$c5
.byte $00,$c5
.byte $00,$45
.byte $80
.byte $6c,$6f,$77,$20,$41,$53,$43,$49,$49,$20,$73,$74,$72
.byte $e8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$f3,$f4,$f2
.enc sg_ascii
.text "low ASCII str"
.enc sg_hiascii
.text "high ASCII str"
.byte $80
.byte $d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$53,$54,$52
.enc none
.text "PETSCII str"
.byte $80
.enc screen
.text "Screen Code str"
.byte $82
.byte $07,$4c,$6f,$77,$20,$41,$53,$43,$49,$49,$20,$43,$52,$4c,$46,$0d
.byte $0a
.enc sg_ascii
.text $07,"Low ASCII CRLF",$0d,$0a
.byte $82
.byte $87,$c8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$c3,$d2,$cc,$c6
.byte $8d,$8a
.enc sg_hiascii
.text $87,"High ASCII CRLF",$8d,$8a
.byte $82
.byte $93,$d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$57,$49,$54,$48,$20,$96,$43
.byte $4f,$4e,$54,$52,$4f,$4c,$05,$20,$43,$4f,$44,$45,$53,$0d
.enc none
.text $93,"PETSCII with ",$96,"control",$05," codes",$0d
.byte $83
.byte $20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2a,$2b,$2c,$2d,$2e,$2f
.byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$3e,$3f
.byte $40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$4a,$4b,$4c,$4d,$4e,$4f
.byte $50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$5a,$5b,$5c,$5d,$5e,$5f
.byte $60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$6a,$6b,$6c,$6d,$6e,$6f
.byte $70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$7a,$7b,$7c,$7d,$7e
.enc sg_ascii
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.byte $a0,$a1,$a2,$a3,$a4,$a5,$a6,$a7,$a8,$a9,$aa,$ab,$ac,$ad,$ae,$af
.byte $b0,$b1,$b2,$b3,$b4,$b5,$b6,$b7,$b8,$b9,$ba,$bb,$bc,$bd,$be,$bf
.byte $c0,$c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$ca,$cb,$cc,$cd,$ce,$cf
.byte $d0,$d1,$d2,$d3,$d4,$d5,$d6,$d7,$d8,$d9,$da,$db,$dc,$dd,$de,$df
.byte $e0,$e1,$e2,$e3,$e4,$e5,$e6,$e7,$e8,$e9,$ea,$eb,$ec,$ed,$ee,$ef
.byte $f0,$f1,$f2,$f3,$f4,$f5,$f6,$f7,$f8,$f9,$fa,$fb,$fc,$fd,$fe
.enc sg_hiascii
.text " !",$a2,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.byte $20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2a,$2b,$2c,$2d,$2e,$2f
.byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$3e,$3f
.byte $40,$c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$ca,$cb,$cc,$cd,$ce,$cf
.byte $d0,$d1,$d2,$d3,$d4,$d5,$d6,$d7,$d8,$d9,$da,$5b
.enc none
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $5c
.byte $5d
.byte ']'
.byte $5e
.byte $5f
.byte $60
.byte $41,$42,$43,$44,$45,$46,$47,$48,$49,$4a,$4b,$4c,$4d,$4e,$4f,$50
.byte $51,$52,$53,$54,$55,$56,$57,$58,$59,$5a
.text "abcdefghijklmnopqrstuvwxyz"
.byte $7b
.byte $7c
.byte $7d
.byte $7e
.byte $83
.enc screen
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $1c
@ -104,26 +121,21 @@
.byte $7d
.byte $7e
.byte $84
.byte $c9,$c9,$c3,$d3,$d4,$c5,$d0,$20,$45,$53,$52,$45,$56,$45,$52
.enc none
.text "IICSTEP esrever"
.byte $84
.byte $4e,$55,$4c,$4c,$20,$54,$45,$52,$4d,$20,$d0,$c5,$d4,$d3,$c3,$c9
.byte $c9,$00
.null "null term PETSCII"
.byte $84
.byte $d4,$48,$49,$53,$20,$4e,$55,$4c,$4c,$2d,$54,$45,$52,$4d,$49,$4e
.byte $41,$54,$45,$44,$20,$53,$54,$52,$49,$4e,$47,$20,$49,$53,$20,$54
.byte $4f,$4f,$20,$4c,$4f,$4e,$47,$20,$54,$4f,$20,$46,$49,$54,$20,$4f
.byte $4e,$20,$41,$20,$53,$49,$4e,$47,$4c,$45,$20,$4c,$49,$4e,$45,$2c
.byte $20,$41,$4e,$44,$20,$57,$49,$4c,$4c,$20,$42,$45,$20,$53,$50,$4c
.byte $49,$54,$2e,$00
.text "This null-terminated string is too long to fit on a single lin"
.text "e, and will be split.",$00
.byte $84
.byte $13,$d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$57,$49,$54,$48,$20,$4c,$45
.byte $4e,$47,$54,$48
.ptext "PETSCII with length"
.byte $84
.byte $14,$00,$d0,$c5,$d4,$d3,$c3,$c9,$c9,$20,$57,$49,$54,$48,$20,$4c
.byte $45,$4e,$47,$54,$48,$32
.text $14,$00,"PETSCII with length2"
.byte $84
.byte $50,$45,$54,$20,$44,$43,$c9
.shift "pet dci"
.byte $84
.enc screen
.text "edoC neercS esrever"
.byte $84
.ptext "Screen Code with length"