1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-29 10:50:28 +00:00

Update comments

This commit is contained in:
Andy McFadden 2018-10-27 12:46:10 -07:00
parent c46afe377e
commit 18994ef772
2 changed files with 12 additions and 19 deletions

View File

@ -514,22 +514,15 @@ namespace SourceGen.AsmGen {
}
private void OutputString(int offset, string labelStr, string commentStr) {
// Normal ASCII strings are straightforward: they're just part of a .byte
// directive, and can mix with anything else in the .byte.
// Normal ASCII strings are handled with a simple .text directive.
//
// For CString we can use .asciiz, but only if the string fits on one line
// and doesn't include delimiters. For L8String and L16String we can
// define simple macros, but their use has a similar restriction. High-ASCII
// strings also require a macro.
// CString and L8String have directives (.null, .ptext), but we can only use
// them if the string fits on one line and doesn't include delimiters.
//
// We might be able to define a macro for DCI and Reverse as well.
// We could probably do something fancy with the character encoding options to
// make high-ASCII work nicely.
//
// The limitation on strings with delimiters arises because (1) I don't see a
// way to escape them within a string, and (2) the simple macro workarounds
// only take a single argument, not a comma-separated list of stuff.
//
// Some ideas here:
// https://groups.google.com/forum/#!topic/comp.sys.apple2.programmer/5Wkw8mUPcU0
// We might be able to define a macro for DCI and Reverse.
Formatter formatter = SourceFormatter;
byte[] data = Project.FileData;
@ -604,12 +597,12 @@ namespace SourceGen.AsmGen {
switch (dfd.FormatSubType) {
case FormatDescriptor.SubType.None:
// TODO: something fancy with encodings to handle high-ASCII text?
// TODO(someday): something fancy with encodings to handle high-ASCII text?
break;
case FormatDescriptor.SubType.Dci:
case FormatDescriptor.SubType.Reverse:
case FormatDescriptor.SubType.DciReverse:
// Full configured above.
// Fully configured above.
break;
case FormatDescriptor.SubType.CString:
if (gath.NumLinesOutput == 1 && !gath.HasDelimiter) {

View File

@ -28,10 +28,10 @@ namespace SourceGen.AsmGen {
///
/// This code is common to all generators.
/// </summary>
/// <param name="project"></param>
/// <param name="formatter"></param>
/// <param name="sw"></param>
/// <param name="worker"></param>
/// <param name="gen">Reference to generator object (presumably the caller).</param>
/// <param name="sw">Text output sink.</param>
/// <param name="worker">Background worker object, for progress updates and
/// cancelation requests.</param>
public static void Generate(IGenerator gen, StreamWriter sw, BackgroundWorker worker) {
DisasmProject proj = gen.Project;
Formatter formatter = gen.SourceFormatter;