![](http://datasheet.mmic.net.cn/230000/W65C816S8P-14_datasheet_15631103/W65C816S8P-14_50.png)
WESTERN DESIGN CENTER
6.3.3.3 Note that the operand does not determine whether or not immediate address loads one or
two bytes, this is determined by the setting of the status register. This forces the
requirement for a directive or directives that tell the assembler to generate one or two
bytes of space for immediate loads. The directives provided shall allow separate
settings for the accumulator and index registers.
6.3.3.4 The assembler shall use the <, >, and ^ characters after the # character in immediate
address to specify which byte or bytes will be selected from the value of the operand.
Any calculations in the operand must be performed before the byte selection takes
place. Table 7-3 defines the action taken by each operand by showing the effect of
the operator on an address. The column that shows a two byte immediate value
show the bytes in the order in which they appear in memory. The coding of the
operand is for an assembler which uses 32-bit address calculations, showing the way
that the address should be reduced to a 24-bit value.
Table 6-3 Byte Selection Operator
W65C816S
March 1, 2000
50
Operand
One Byte
Result
Two Byte
Result
#$01020304
04
04
03
#<$01020304
04
04
03
#>$01020304
03
03
02
#^$01020304
02
02
01
6.3.3.5 In any location in an operand where an address, or expression resulting in an address, can
be coded, the assembler shall recognize the prefix characters <, |, and >, which force
one byte (direct page), two byte (absolute) or three byte (long absolute) addressing.
In cases where the addressing modes is not forced, the assembler shall assume that
the address is two bytes unless the assembler is able to determine the type of
addressing required by context, in which case that addressing mode will be used.
Addresses shall be truncated without error in an addressing mode is forced which
does not require the entire value of the address. For example, LDA $0203 and LDA
|$010203 are completely equivalent. If the addressing mode is not forced, and the
type of addressing cannot be determined from context, the assembler shall assume
that a two byte address is to be used. If an instruction does not have a short
addressing mode (as in LDA< which has no direct page indexed by Y) and a short
address is used in the operand, the assembler shall automatically extend the address
by padding the most significant bytes with zeroes in order to extend the address to
the length needed. As with immediate address, any expression evaluation shall take
place before the address is selected; thus, the address selection character is only used
once, before the address of expression.
6.3.3.6
The ! (exclamation point) character should be supported as an alternative to the | (vertical
bar).
6.3.3.7
A long indirect address is indicated in the operand field of an instruction field of an
instruction by surrounding the direct page address where the indirect address is
found by square brackets; direct page addresses which contain sixteen-bit addresses
are indicated by being surrounded by parentheses.
6.3.4
Comment Field --The comment field may start no sooner than one space after the
operation code field or operand field depending on instruction type.