![](http://datasheet.mmic.net.cn/230000/W65C816S8P-14_datasheet_15631103/W65C816S8P-14_47.png)
WESTERN DESIGN CENTER
W65C816S
March 1, 2000
47
SECTION 6
RECOMMENDED W65C816S ASSEMBLER SYNTAX STANDARDS
6.1
Directives
Assembler directives are those parts of the assembly language source program which give directions to the
assembler; this includes the definition of data area and constants within a program. This standard excludes
any definitions of assembler directives.
6
.2
Comments
An assembler should provide a way to use any line of the source program as a comment. The
recommended way of doing this is to treat any blank line, or any line that starts with a semi-colon or an
asterisk as a comment. Other special characters may be used as well.
6
.3
The Source Line
Any line which causes the generation of a single W65C816S machine language instruction should be
divided into four fields: a label field, the operation code, the operand, the comment field.
6.3.1
The Label Field --The label field begins in column one of the line. A label must start with
an alphabetic character, and may be followed by zero or more alphanumeric characters.
An assembler may define an upper limit on the number of characters that can be in a label,
so long as that upper limit is greater than or equal to six characters. An assembler may
limit the alphabetic characters to upper-case characters if desired. If lower-case characters
are allowed, they should be treated as identical to their upper-case equivalents. Other
characters may be allowed in the label, so long as their use does not conflict with the
coding of operand fields.
The Operation Code Field --The operation code shall consist of a three character sequence
(mnemonic) from Table 6-1. It shall start no sooner than column 2 of the line, or one space
after the label if a label is coded.
6.3.2.1 Many of the operation codes in Table 6-1 have duplicate mnemonics; when two or
more machine language instruction have the same mnemonic, the assembler
resolves the difference based on the operand.
6.3.2.2 If an assembler allows lower-case letters in labels, it must also allow lower-case
letters in the mnemonic. When lower-case letters are used in the mnemonic, they
shall be treated as equivalent to the upper-case counterpart. Thus, the mnemonics
LDA, lda and LdA must all be recognized, and are equivalent.
6.3.2.3 In addition to the mnemonics shown in Table 6-1, an assembler may provide the
alternate mnemonics show in Table 7-1.
6.3.2