From fa417d0682ead4d87fafdd0ee3b5bb1efdb5cdf0 Mon Sep 17 00:00:00 2001 From: uz Date: Fri, 6 Mar 2009 10:10:24 +0000 Subject: [PATCH] Add a paragraph about which identifiers are valid for labels. git-svn-id: svn://svn.cc65.org/cc65/trunk@3960 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- doc/ca65.sgml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/ca65.sgml b/doc/ca65.sgml index f93eb69c4..44dfd7191 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -574,11 +574,20 @@ To force a specific order of evaluation, parentheses may be used, as usual. Symbols and labels

+A symbol or label is an identifier that starts with a letter and is followed +by letters and digits. Depending on some features enabled (see +, + and +) +other characters may be present. Use of identifiers consisting of a single +character will not work in all cases, because some of these identifiers are +reserved keywords (for example "A" is not a valid identifier for a label, +because it is the keyword for the accumulator). + The assembler allows you to use symbols instead of naked values to make the source more readable. There are a lot of different ways to define and use symbols and labels, giving a lot of flexibility. - Numeric constants

Numeric constants are defined using the equal sign or the label assignment @@ -2230,7 +2239,7 @@ Here's a list of all control commands and a description, what they do: - at_in_identifiers + at_in_identifiers Accept the at character (`@') as a valid character in identifiers. The at character is not allowed to start an identifier, even with this @@ -2249,10 +2258,10 @@ Here's a list of all control commands and a description, what they do: */ sta $82 - dollar_in_identifiers + dollar_in_identifiers Accept the dollar sign (`$') as a valid character in identifiers. The - at character is not allowed to start an identifier, even with this + dollar character is not allowed to start an identifier, even with this feature enabled. dollar_is_pc @@ -2266,7 +2275,7 @@ Here's a list of all control commands and a description, what they do: Allow labels without a trailing colon. These labels are only accepted, if they start at the beginning of a line (no leading white space). - leading_dot_in_identifiers + leading_dot_in_identifiers Accept the dot (`.') as the first character of an identifier. This may be used for example to create macro names that start with a dot emulating