1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-30 15:29:01 +00:00

Tweak Merlin DS output

The default fill value is $00.  Don't specify it explicitly when we
don't have to.
This commit is contained in:
Andy McFadden 2020-01-01 17:42:21 -08:00
parent 9c5ba9ca4b
commit 32d6d849ea
6 changed files with 29 additions and 17 deletions

View File

@ -264,7 +264,11 @@ namespace SourceGen.AsmGen {
break; break;
case FormatDescriptor.Type.Fill: case FormatDescriptor.Type.Fill:
opcodeStr = sDataOpNames.Fill; opcodeStr = sDataOpNames.Fill;
operandStr = length + "," + formatter.FormatHexValue(data[offset], 2); if (data[offset] == 0) {
operandStr = length.ToString();
} else {
operandStr = length + "," + formatter.FormatHexValue(data[offset], 2);
}
break; break;
case FormatDescriptor.Type.Dense: case FormatDescriptor.Type.Dense:
multiLine = true; multiLine = true;
@ -278,9 +282,17 @@ namespace SourceGen.AsmGen {
if (dfd.FormatSubType == FormatDescriptor.SubType.Align256 && if (dfd.FormatSubType == FormatDescriptor.SubType.Align256 &&
GenCommon.CheckJunkAlign(offset, dfd, Project.AddrMap)) { GenCommon.CheckJunkAlign(offset, dfd, Project.AddrMap)) {
// special syntax for page alignment // special syntax for page alignment
operandStr = "\\," + formatter.FormatHexValue(fillVal, 2); if (fillVal == 0) {
operandStr = "\\";
} else {
operandStr = "\\," + formatter.FormatHexValue(fillVal, 2);
}
} else { } else {
operandStr = length + "," + formatter.FormatHexValue(fillVal, 2); if (fillVal == 0) {
operandStr = length.ToString();
} else {
operandStr = length + "," + formatter.FormatHexValue(fillVal, 2);
}
} }
} else { } else {
// treat same as Dense // treat same as Dense

View File

@ -24,9 +24,9 @@
dfb $00 dfb $00
dfb $00 dfb $00
dfb $81 dfb $81
ds 5,$00 ds 5
dfb $81 dfb $81
ds 8,$00 ds 8
L10AC ds 8,$00 L10AC ds 8
ds 8,$82 ds 8,$82
L10BC ds 8,$82 L10BC ds 8,$82

View File

@ -29,15 +29,15 @@
ddb $1122 ddb $1122
dfb $11,$22,$33 dfb $11,$22,$33
dfb $11,$22,$33,$44 dfb $11,$22,$33,$44
ds 2,$00 ds 2
dfb $80 dfb $80
ds 3,$00 ds 3
dfb $80 dfb $80
ds 4,$00 ds 4
dfb $80 dfb $80
ds 5,$00 ds 5
dfb $80 dfb $80
ds 256,$00 ds 256
dfb $80 dfb $80
ds 257,$cc ds 257,$cc
hex 11 hex 11
@ -49,7 +49,7 @@ LABEL hex 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
dfb $80 dfb $80
ds \,$aa ds \,$aa
dfb $81 dfb $81
ds 63,$00 ds 63
dfb $81 dfb $81
ds 31,$ab ds 31,$ab
hex 0000000000000001 hex 0000000000000001
@ -57,7 +57,7 @@ LABEL hex 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
hex 1000000000000000 hex 1000000000000000
dfb $81 dfb $81
ds 2,$dd ;incorrect alignment ds 2,$dd ;incorrect alignment
ds \,$00 ds \
ds 16,$82 ds 16,$82
ds 8,$83 ds 8,$83
org $1428 org $1428

View File

@ -63,9 +63,9 @@ L2000 bit L2000
org $2800 org $2800
dfb $00 dfb $00
dfb $28 dfb $28
ds 14,$00 ds 14
org $2820 org $2820
ds 18,$00 ds 18
org $3000 org $3000
:L3000 bit :L3000 :L3000 bit :L3000

View File

@ -17,7 +17,7 @@ load11 lda #$11
dw :L1042 dw :L1042
dw :L1041 dw :L1041
dw :L1042+1 dw :L1042+1
:fill0 ds 16,$00 :fill0 ds 16
:L1041 dfb $80 :L1041 dfb $80
:L1042 lda :predat+2 :L1042 lda :predat+2

View File

@ -3,7 +3,7 @@ L10F0 sec ;2
xce ;2 xce ;2
bra :L1108 ;4 crosses page boundary bra :L1108 ;4 crosses page boundary
ds 20,$00 ds 20
:L1108 bra :L110A ;3 :L1108 bra :L110A ;3