diff --git a/SourceGen/AppSettings.cs b/SourceGen/AppSettings.cs
index 41fc265..340bbb5 100644
--- a/SourceGen/AppSettings.cs
+++ b/SourceGen/AppSettings.cs
@@ -62,6 +62,7 @@ namespace SourceGen {
public const string FMT_OPERAND_PREFIX_ABS = "fmt-operand-prefix-abs";
public const string FMT_OPERAND_PREFIX_LONG = "fmt-operand-prefix-long";
public const string FMT_EXPRESSION_MODE = "fmt-expression-mode";
+ public const string FMT_FULL_COMMENT_DELIM = "fmt-full-comment-delim";
public const string FMT_PSEUDO_OP_NAMES = "fmt-pseudo-op-names";
public const string FMT_CHAR_DELIM = "fmt-char-delim";
diff --git a/SourceGen/AsmGen/AsmMerlin32.cs b/SourceGen/AsmGen/AsmMerlin32.cs
index e1bcd83..f1ae90d 100644
--- a/SourceGen/AsmGen/AsmMerlin32.cs
+++ b/SourceGen/AsmGen/AsmMerlin32.cs
@@ -201,7 +201,7 @@ namespace SourceGen.AsmGen {
config.ForceLongOperandPrefix = string.Empty;
config.LocalVariableLabelPrefix = "]";
config.EndOfLineCommentDelimiter = ";";
- config.FullLineCommentDelimiterBase = ";";
+ config.FullLineCommentDelimiterBase = "*";
config.BoxLineCommentDelimiter = string.Empty;
config.NonUniqueLabelPrefix = ":";
config.CommaSeparatedDense = false;
diff --git a/SourceGen/AsmGen/GenCommon.cs b/SourceGen/AsmGen/GenCommon.cs
index ed4c7bd..3603bf6 100644
--- a/SourceGen/AsmGen/GenCommon.cs
+++ b/SourceGen/AsmGen/GenCommon.cs
@@ -525,6 +525,9 @@ namespace SourceGen.AsmGen {
string exprMode = settings.GetString(AppSettings.FMT_EXPRESSION_MODE, string.Empty);
config.ExprMode = Formatter.FormatConfig.ParseExpressionMode(exprMode);
+ config.FullLineCommentDelimiterBase =
+ settings.GetString(AppSettings.FMT_FULL_COMMENT_DELIM, ";");
+
// Not doing the delimiter patterns here, because what's in the config file is
// intended for on-screen display, and hence likely to be unsuited for an assembler.
diff --git a/SourceGen/Exporter.cs b/SourceGen/Exporter.cs
index bff2d51..f71e4f6 100644
--- a/SourceGen/Exporter.cs
+++ b/SourceGen/Exporter.cs
@@ -241,6 +241,9 @@ namespace SourceGen {
sb.Append(";varPfx='");
sb.Append(mFormatter.Config.LocalVariableLabelPrefix);
sb.Append('\'');
+ sb.Append(";flcd='");
+ sb.Append(mFormatter.Config.FullLineCommentDelimiterBase);
+ sb.Append('\'');
sb.Append(";labelBrk=");
sb.Append(LongLabelNewLine.ToString());
sb.Append(";notes=");
diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs
index f082fd5..c5d1749 100644
--- a/SourceGen/MainController.cs
+++ b/SourceGen/MainController.cs
@@ -493,7 +493,6 @@ namespace SourceGen {
AsmGen.GenCommon.ConfigureFormatterFromSettings(AppSettings.Global,
ref mFormatterConfig);
mFormatterConfig.EndOfLineCommentDelimiter = ";";
- mFormatterConfig.FullLineCommentDelimiterBase = ";";
mFormatterConfig.BoxLineCommentDelimiter = string.Empty;
mFormatterConfig.NonUniqueLabelPrefix =
diff --git a/SourceGen/SGTestData/20062-target-adjustment.dis65 b/SourceGen/SGTestData/20062-target-adjustment.dis65
index ec76653..670c8bb 100644
--- a/SourceGen/SGTestData/20062-target-adjustment.dis65
+++ b/SourceGen/SGTestData/20062-target-adjustment.dis65
@@ -1,6 +1,6 @@
### 6502bench SourceGen dis65 v1.0 ###
{
-"_ContentVersion":4,
+"_ContentVersion":6,
"FileDataLength":23,
"FileDataCrc32":-1829154192,
"ProjectProps":{
@@ -25,7 +25,12 @@
"AddressMap":[{
"Offset":0,
-"Addr":4096}],
+"Addr":4096,
+"Length":-1024,
+"PreLabel":"",
+"DisallowInward":false,
+"DisallowOutward":false,
+"IsRelative":false}],
"TypeHints":[{
"Low":0,
"High":0,
@@ -37,11 +42,7 @@
},
"LongComments":{
-"-2147483647":{
-"Text":"6502bench SourceGen v1.7.3-dev2",
-"BoxMode":false,
-"MaxWidth":80,
-"BackgroundColor":0}},
+},
"Notes":{
},
diff --git a/SourceGen/SGTestData/Expected/20000-numeric-types_merlin32.S b/SourceGen/SGTestData/Expected/20000-numeric-types_merlin32.S
index 80bae86..4daa2bb 100644
--- a/SourceGen/SGTestData/Expected/20000-numeric-types_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20000-numeric-types_merlin32.S
@@ -1,5 +1,5 @@
-;Project file was edited to get all big-endian data types, and to have an
-;incorrect .junk alignment directive.
+*Project file was edited to get all big-endian data types, and to have an
+*incorrect .junk alignment directive.
org $1000
bit L1448
jsr L14A8
@@ -70,7 +70,7 @@ UserLabel ds 8,$84
L1448 ds 8,$85
ds 16,$86
asc 8787878787878787
-;long comment
+*long comment
asc 8787878787878787
ds 16,$88
ds 8,$89
diff --git a/SourceGen/SGTestData/Expected/20010-string-types_merlin32.S b/SourceGen/SGTestData/Expected/20010-string-types_merlin32.S
index c641458..b55542f 100644
--- a/SourceGen/SGTestData/Expected/20010-string-types_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20010-string-types_merlin32.S
@@ -1,4 +1,4 @@
-;Project file was edited to get zero-length strings and reverse DCI.
+*Project file was edited to get zero-length strings and reverse DCI.
org $1000
rts
diff --git a/SourceGen/SGTestData/Expected/20020-operand-formats_merlin32.S b/SourceGen/SGTestData/Expected/20020-operand-formats_merlin32.S
index 198ab54..ec34bc6 100644
--- a/SourceGen/SGTestData/Expected/20020-operand-formats_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20020-operand-formats_merlin32.S
@@ -1,4 +1,4 @@
-;Project file was edited to force ASCII formatting for some operands.
+*Project file was edited to force ASCII formatting for some operands.
org $1000
lda $01
lda $0102
diff --git a/SourceGen/SGTestData/Expected/20022-operand-formats_merlin32.S b/SourceGen/SGTestData/Expected/20022-operand-formats_merlin32.S
index 348136d..6867571 100644
--- a/SourceGen/SGTestData/Expected/20022-operand-formats_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20022-operand-formats_merlin32.S
@@ -1,4 +1,4 @@
-;Project file was edited to force ASCII formatting for some operands.
+*Project file was edited to force ASCII formatting for some operands.
org $1000
clc
xce
diff --git a/SourceGen/SGTestData/Expected/20030-labels-and-symbols_merlin32.S b/SourceGen/SGTestData/Expected/20030-labels-and-symbols_merlin32.S
index a500d5a..b4ffd6d 100644
--- a/SourceGen/SGTestData/Expected/20030-labels-and-symbols_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20030-labels-and-symbols_merlin32.S
@@ -1,5 +1,5 @@
-;Project was edited to add a label in the middle of a dense hex region, and add
-;a duplicate label.
+*Project was edited to add a label in the middle of a dense hex region, and add
+*a duplicate label.
BMI equ $30 ;opcode mnemonic
zip equ $cd
absl equ $1029
diff --git a/SourceGen/SGTestData/Expected/20032-labels-and-symbols_merlin32.S b/SourceGen/SGTestData/Expected/20032-labels-and-symbols_merlin32.S
index c02ddfe..7fbd4de 100644
--- a/SourceGen/SGTestData/Expected/20032-labels-and-symbols_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20032-labels-and-symbols_merlin32.S
@@ -1,5 +1,5 @@
-;Project was edited to add a label in the middle of a dense hex region, and add
-;a duplicate label.
+*Project was edited to add a label in the middle of a dense hex region, and add
+*a duplicate label.
BMI equ $30 ;opcode mnemonic
zip equ $cd
absl equ $1029
diff --git a/SourceGen/SGTestData/Expected/20062-target-adjustment_64tass.S b/SourceGen/SGTestData/Expected/20062-target-adjustment_64tass.S
index 036a235..c5a5783 100644
--- a/SourceGen/SGTestData/Expected/20062-target-adjustment_64tass.S
+++ b/SourceGen/SGTestData/Expected/20062-target-adjustment_64tass.S
@@ -1,4 +1,3 @@
-;6502bench SourceGen v1.7.3-dev2
.cpu "65816"
* = $1000
.as
diff --git a/SourceGen/SGTestData/Expected/20062-target-adjustment_acme.S b/SourceGen/SGTestData/Expected/20062-target-adjustment_acme.S
index 3ed5bf6..87dd0d1 100644
--- a/SourceGen/SGTestData/Expected/20062-target-adjustment_acme.S
+++ b/SourceGen/SGTestData/Expected/20062-target-adjustment_acme.S
@@ -1,4 +1,3 @@
-;6502bench SourceGen v1.7.3-dev2
!cpu 65816
* = $1000
!as
diff --git a/SourceGen/SGTestData/Expected/20062-target-adjustment_cc65.S b/SourceGen/SGTestData/Expected/20062-target-adjustment_cc65.S
index d955272..28c2d83 100644
--- a/SourceGen/SGTestData/Expected/20062-target-adjustment_cc65.S
+++ b/SourceGen/SGTestData/Expected/20062-target-adjustment_cc65.S
@@ -1,4 +1,3 @@
-;6502bench SourceGen v1.7.3-dev2
.setcpu "65816"
.org $1000
.a8
diff --git a/SourceGen/SGTestData/Expected/20062-target-adjustment_merlin32.S b/SourceGen/SGTestData/Expected/20062-target-adjustment_merlin32.S
index cf2522d..3a14f73 100644
--- a/SourceGen/SGTestData/Expected/20062-target-adjustment_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20062-target-adjustment_merlin32.S
@@ -1,4 +1,3 @@
-;6502bench SourceGen v1.7.3-dev2
org $1000
nop
L1001 bit L1001
diff --git a/SourceGen/SGTestData/Expected/20090-notes-and-comments_merlin32.S b/SourceGen/SGTestData/Expected/20090-notes-and-comments_merlin32.S
index 2143562..98f191f 100644
--- a/SourceGen/SGTestData/Expected/20090-notes-and-comments_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20090-notes-and-comments_merlin32.S
@@ -14,25 +14,25 @@
****************************************
plataddr equ $3000 ;address only in platform file
-;Short, unboxed comment here!!
-;Two spaces after. More hyp-
-;hens?
+*Short, unboxed comment here!!
+*Two spaces after. More hyp-
+*hens?
org $1000
lda #$01 ;Comment!
-;Comment rulers can be helpful in findin the edges of notes. Comments are hyph-
-;enatingly fun. Like the note, this goes out to 80 columns.
+*Comment rulers can be helpful in findin the edges of notes. Comments are hyph-
+*enatingly fun. Like the note, this goes out to 80 columns.
lda #$02 ;&another comment with &&s!
-;Down to 64 columns this time. Why 64? Why not 64. A rose, by
-;any other name, would break the line at the same place. Or hy-
-;phen split.
+*Down to 64 columns this time. Why 64? Why not 64. A rose, by
+*any other name, would break the line at the same place. Or hy-
+*phen split.
lda #$03
-;Ah, the classic 40-column limitation...
-;brings back memories. Of, you know, h-
-;yphenated things.
+*Ah, the classic 40-column limitation...
+*brings back memories. Of, you know, h-
+*yphenated things.
lda #$04
-;Thirty columns. 'cause forty
-;felt like too many. Oh, hyp-
-;henation!
+*Thirty columns. 'cause forty
+*felt like too many. Oh, hyp-
+*henation!
lda #$05 ;comment ending in backslash\
********************************************************************************
* Short box comment, 80 cols. *
diff --git a/SourceGen/SGTestData/Expected/20120-char-encoding-a_merlin32.S b/SourceGen/SGTestData/Expected/20120-char-encoding-a_merlin32.S
index f882640..cf647c6 100644
--- a/SourceGen/SGTestData/Expected/20120-char-encoding-a_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20120-char-encoding-a_merlin32.S
@@ -1,4 +1,4 @@
-;Projected edited to format non-char operands as chars.
+*Projected edited to format non-char operands as chars.
org $1000
lda #'A'
lda #"A"
diff --git a/SourceGen/SGTestData/Expected/20130-char-encoding-p_merlin32.S b/SourceGen/SGTestData/Expected/20130-char-encoding-p_merlin32.S
index 1dab7c5..6efdffd 100644
--- a/SourceGen/SGTestData/Expected/20130-char-encoding-p_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20130-char-encoding-p_merlin32.S
@@ -1,4 +1,4 @@
-;Projected edited to format non-char operands as chars.
+*Projected edited to format non-char operands as chars.
org $1000
lda #'A'
lda #"A"
diff --git a/SourceGen/SGTestData/Expected/20140-char-encoding-s_merlin32.S b/SourceGen/SGTestData/Expected/20140-char-encoding-s_merlin32.S
index a8232a6..1db7397 100644
--- a/SourceGen/SGTestData/Expected/20140-char-encoding-s_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20140-char-encoding-s_merlin32.S
@@ -1,4 +1,4 @@
-;Projected edited to format non-char operands as chars.
+*Projected edited to format non-char operands as chars.
org $1000
lda #'A'
lda #"A"
diff --git a/SourceGen/SGTestData/Expected/20150-local-variables_merlin32.S b/SourceGen/SGTestData/Expected/20150-local-variables_merlin32.S
index 932e5be..a444a2e 100644
--- a/SourceGen/SGTestData/Expected/20150-local-variables_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20150-local-variables_merlin32.S
@@ -1,4 +1,4 @@
-;Edited to have duplicate labels (PROJ_ZERO, DPCODE).
+*Edited to have duplicate labels (PROJ_ZERO, DPCODE).
CONST_ZERO equ $f0 ;project const
PROJ_ZERO equ $00 ;project addr
@@ -56,8 +56,8 @@ L103C lda #$fe
ldy $12
lda #$10
ora #$13
-;Test name redefinition. This is mostly of interest for assemblers without
-;redefinable variables, but also of interest to the cross-reference window.
+*Test name redefinition. This is mostly of interest for assemblers without
+*redefinable variables, but also of interest to the cross-reference window.
]PTR equ $20 ;#1
ldx ]PTR
]PTR equ $22 ;#2
diff --git a/SourceGen/SGTestData/Expected/20152-local-variables_merlin32.S b/SourceGen/SGTestData/Expected/20152-local-variables_merlin32.S
index 886ecd3..0e61538 100644
--- a/SourceGen/SGTestData/Expected/20152-local-variables_merlin32.S
+++ b/SourceGen/SGTestData/Expected/20152-local-variables_merlin32.S
@@ -1,4 +1,4 @@
-;Edited to have duplicate labels (PROJ_ZERO, DPCODE).
+*Edited to have duplicate labels (PROJ_ZERO, DPCODE).
CONST_ZERO equ $f0 ;project const
PROJ_ZERO equ $00 ;project addr
@@ -56,8 +56,8 @@ L103C lda #$fe
ldy $12
lda (]CONST0,S),y
sta (]CONST0+3,S),y
-;Test name redefinition. This is mostly of interest for assemblers without
-;redefinable variables, but also of interest to the cross-reference window.
+*Test name redefinition. This is mostly of interest for assemblers without
+*redefinable variables, but also of interest to the cross-reference window.
]PTR equ $20 ;#1
ldx ]PTR
]PTR equ $22 ;#2
diff --git a/SourceGen/WpfGui/EditAppSettings.xaml b/SourceGen/WpfGui/EditAppSettings.xaml
index b1d8fae..f431982 100644
--- a/SourceGen/WpfGui/EditAppSettings.xaml
+++ b/SourceGen/WpfGui/EditAppSettings.xaml
@@ -147,7 +147,7 @@ limitations under the License.
Different assemblers have different ways of forming expressions. Sometimes the rules allow expressions to be written simply, other times explicit grouping with parenthesis is required. Select whichever style -you are most comfortable with.
+you are most comfortable with. +(64tass and ACME use the "common" +expression style, cc65 and Merlin 32 have their own unique styles.) + +The character used to start a full-line comment is usually
+';
', but can be changed here.
Non-unique labels are identified with a prefix character, typically
-'@' or ':'. The default is '@', but you can configure it to any character
-that isn't valid for the start of a label. (64tass uses '_' for locals,
+'@
' or ':
'. The default is '@
',
+but you can configure it to any character that isn't valid for the start
+of a label. (64tass uses '_
' for locals,
but that's a valid label start character, and so isn't allowed here.)
The setting affects label editing as well as display.
The "quick set" pop-up configures the fields on the left side of the tab to match the conventions of the specified assembler. Select your preferred assembler in the combo box to set the fields. The setting -automatically switches to "custom" when you edit a field. -(64tass and ACME use the "common" -expression style, cc65 and Merlin 32 have their own unique styles.)
+automatically changes to "custom" when you modify a field.The add spaces in Bytes column checkbox changes the format of the hex data in the code list "bytes" column from dense