mirror of
https://github.com/fadden/6502bench.git
synced 2025-08-10 12:24:58 +00:00
Use Merlin 32 "putbin" directive
I had missed the existence of Merlin 32's PUTBIN directive, which provides the binary include feature.
This commit is contained in:
@@ -51,6 +51,11 @@ namespace SourceGen.AsmGen {
|
|||||||
// IGenerator
|
// IGenerator
|
||||||
public int StartOffset { get { return 0; } }
|
public int StartOffset { get { return 0; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// List of binary include sections found in the project.
|
||||||
|
/// </summary>
|
||||||
|
private List<BinaryInclude.Excision> mBinaryIncludes = new List<BinaryInclude.Excision>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Working directory, i.e. where we write our output file(s).
|
/// Working directory, i.e. where we write our output file(s).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -133,7 +138,7 @@ namespace SourceGen.AsmGen {
|
|||||||
{ "Uninit", "ds" },
|
{ "Uninit", "ds" },
|
||||||
//Junk
|
//Junk
|
||||||
//Align
|
//Align
|
||||||
//BinaryInclude
|
{ "BinaryInclude", "putbin" },
|
||||||
{ "StrGeneric", "asc" },
|
{ "StrGeneric", "asc" },
|
||||||
{ "StrReverse", "rev" },
|
{ "StrReverse", "rev" },
|
||||||
//StrNullTerm
|
//StrNullTerm
|
||||||
@@ -244,8 +249,7 @@ namespace SourceGen.AsmGen {
|
|||||||
}
|
}
|
||||||
mOutStream = null;
|
mOutStream = null;
|
||||||
|
|
||||||
return new GenerationResults(pathNames, string.Empty,
|
return new GenerationResults(pathNames, string.Empty, mBinaryIncludes);
|
||||||
new List<BinaryInclude.Excision>());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IGenerator
|
// IGenerator
|
||||||
@@ -318,7 +322,6 @@ namespace SourceGen.AsmGen {
|
|||||||
break;
|
break;
|
||||||
case FormatDescriptor.Type.Uninit:
|
case FormatDescriptor.Type.Uninit:
|
||||||
case FormatDescriptor.Type.Junk:
|
case FormatDescriptor.Type.Junk:
|
||||||
case FormatDescriptor.Type.BinaryInclude: // not supported, gen minimal output
|
|
||||||
int fillVal = Helper.CheckRangeHoldsSingleValue(data, offset, length);
|
int fillVal = Helper.CheckRangeHoldsSingleValue(data, offset, length);
|
||||||
if (fillVal >= 0) {
|
if (fillVal >= 0) {
|
||||||
opcodeStr = sDataOpNames.Fill;
|
opcodeStr = sDataOpNames.Fill;
|
||||||
@@ -350,6 +353,12 @@ namespace SourceGen.AsmGen {
|
|||||||
OutputDenseHex(offset, length, labelStr, commentStr);
|
OutputDenseHex(offset, length, labelStr, commentStr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case FormatDescriptor.Type.BinaryInclude:
|
||||||
|
opcodeStr = sDataOpNames.BinaryInclude;
|
||||||
|
string biPath = BinaryInclude.ConvertPathNameFromStorage(dfd.Extra);
|
||||||
|
operandStr = biPath; // no quotes
|
||||||
|
mBinaryIncludes.Add(new BinaryInclude.Excision(offset, length, biPath));
|
||||||
|
break;
|
||||||
case FormatDescriptor.Type.StringGeneric:
|
case FormatDescriptor.Type.StringGeneric:
|
||||||
case FormatDescriptor.Type.StringReverse:
|
case FormatDescriptor.Type.StringReverse:
|
||||||
case FormatDescriptor.Type.StringNullTerm:
|
case FormatDescriptor.Type.StringNullTerm:
|
||||||
|
@@ -9,9 +9,8 @@ L1000 ldy #$28
|
|||||||
lda done-1
|
lda done-1
|
||||||
jmp done
|
jmp done
|
||||||
|
|
||||||
:L1017 hex 20212223242526272829303132333435363738394142434445464748494a5051
|
:L1017 putbin 20300-1.bin
|
||||||
hex 5253545556575859
|
:L103F putbin 20300sub/20300-2.bin
|
||||||
:L103F ds 32,$ff
|
|
||||||
|
|
||||||
done rts
|
done rts
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user