Section 3: Assembler
159
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
•
Registers can be specified in either all uppercase or all lowercase characters.
•
sp (or SP) is a synonym for a7.
•
The hyphen (
−
) and slash ( / ) are used to specify register lists; the hyphen
is used to designate an ascending register range and the slash is used to
separate ranges (e.g., d3
−
d7/a2
−
a4).
•
Whitespace can be used between operands and within expressions (asm68).
All operands are required for the addressing modes that apply to the 68000; in
the other effective addressing modes, all operands are optional. If a register
operand is legally omitted from an addressing mode, it is suppressed (see
section 3.5.2 Terminology). Since Texas Instruments only supports the 68000,
suppression is not allowed.
The order of operands within parentheses is significant only if it results in
ambiguity. The only such case is when two address registers, of which one or
both can be suppressed, are used and neither has a size qualifier or scaling
factor. Since it cannot be determined which is the base register, the one on the
left is selected arbitrarily. The address register on the right is used as the index
register.
For backward compatibility, the old-style displacement notation associated with
the 68000 is accepted; the effects of specifying effective addresses using
old-style 68000 syntax are discussed below. Table 3.13 shows the four
applicable 68000 addressing modes with both old and new syntaxes.
Addressing Mode
Old Syntax
New Syntax
Address Register Indirect with Displacement
d16(An)
(d16,An)
Address Register Indirect with Index (8-Bit Displacement)
d8(An,Xn)
(d8,An,Xn)
Program Counter Indirect with Displacement
d16(PC)
(d16,PC)
Program Counter Indirect with Index (8-Bit Displacement)
d8(PC,Xn)
(d8,PC,Xn)
Table 3.13: Displacement Syntax Comparisons
Note:
The addressing mode (
expr,PC) or expr(PC) means that expr is referenced relative to
the program counter; it does not represent a relative reference of
expr bytes from the
PC. For example, (8,PC) references the absolute address 8 via the program counter. To
represent a PC-relative reference of 8 bytes from the beginning of the current instruction,
the correct syntax is (.+8,PC) or (*+8,PC), depending on the assembler.