diff --git a/doc/ca65.sgml b/doc/ca65.sgml
index b0ccf6f5e..104c59bbd 100644
--- a/doc/ca65.sgml
+++ b/doc/ca65.sgml
@@ -2867,6 +2867,26 @@ See: ,
+
+ Switch on or off line continuations using the backslash character
+ before a newline. The option is off by default.
+ Note: Line continuations do not work in a comment. A backslash at the
+ end of a comment is treated as part of the comment and does not trigger
+ line continuation.
+
+ Example:
+
+
+ .feature line_continuations + ; Allow line continuations
+
+ lda \
+ #$20 ; This is legal now
+
+
+ For backward compatibility reasons, the .LINECONT + control command
+ is also supported and enables the same feature.
+
long_jsr_jmp_rts
Affects 65816 mode only.
@@ -3371,26 +3391,6 @@ See: ,
-
- Switch on or off line continuations using the backslash character
- before a newline. The option is off by default.
- Note: Line continuations do not work in a comment. A backslash at the
- end of a comment is treated as part of the comment and does not trigger
- line continuation.
- The command can be followed by a '+' or '-' character to switch the
- option on or off respectively.
-
- Example:
-
-
- .linecont + ; Allow line continuations
-
- lda \
- #$20 ; This is legal now
-
-
-
.LIST
) to spread the
+ definition over more than one line for increased readability, but the
+ macro itself may not contain an end-of-line token.
Macros defined with share
the name space with classic macros, but they are detected and replaced
diff --git a/src/ca65/feature.c b/src/ca65/feature.c
index 9f5ca5876..6a38900b5 100644
--- a/src/ca65/feature.c
+++ b/src/ca65/feature.c
@@ -67,6 +67,7 @@ static const char* const FeatureKeys[FEAT_COUNT] = {
"bracket_as_indirect",
"string_escapes",
"long_jsr_jmp_rts",
+ "line_continuations",
};
@@ -121,6 +122,7 @@ void SetFeature (feature_t Feature, unsigned char On)
case FEAT_BRACKET_AS_INDIRECT: BracketAsIndirect = On; break;
case FEAT_STRING_ESCAPES: StringEscapes = On; break;
case FEAT_LONG_JSR_JMP_RTS: LongJsrJmpRts = On; break;
+ case FEAT_LINE_CONTINUATIONS: LineCont = On; break;
default: break;
}
}
diff --git a/src/ca65/feature.h b/src/ca65/feature.h
index 8eeb62e6f..4d307f74d 100644
--- a/src/ca65/feature.h
+++ b/src/ca65/feature.h
@@ -69,6 +69,7 @@ typedef enum {
FEAT_BRACKET_AS_INDIRECT,
FEAT_STRING_ESCAPES,
FEAT_LONG_JSR_JMP_RTS,
+ FEAT_LINE_CONTINUATIONS,
/* Special value: Number of features available */
FEAT_COUNT