152
Section 3: Assembler
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
3.4. Instruction
Set
Only the 68000 instruction set is supported by Texas Instruments. Use of
unsupported instructions gives unpredictable results. This is especially true of the
floating-point instructions. See Table 3.32 in section 3.9 Instruction Set
Summary for a complete list of supported instructions. For detailed information
on any instruction, consult the appropriate Motorola reference manual (see
section 3.1.2 Prerequisite Reading). This section describes the accepted
instruction syntax, the sizing of instructions, and the optimizations that can be
performed.
3.4.1. Syntax
The assemblers asm68 and asm68k recognize the instruction mnemonics that
are used by Motorola. Mnemonics can be specified in either all uppercase or all
lowercase characters, and can include an optional size qualifier. The recognized
mnemonics and corresponding legal size qualifiers are shown in Table 3.32 in
section 3.9 Instruction Set Summary. For restrictions on the placement of
instructions imposed by the statement syntax, see section 3.3.2 Assembler
Statements.
3.4.2. Instruction
Sizing
The size of an instruction is determined according to the first applicable rule in
the following list:
1. The size extension is used, if present.
2. The current default instruction size is used, if legal (see .opt isize / OPT
ISIZE directive).
3. The instruction’s default size is used (see Table 3.32, section
3.9 Instruction Set Summary).
Figure 3.2 demonstrates how these rules are used to determine the sizes of
various instructions. Word size is not legal for the lea instruction, and the jsr
instruction is unsized.
movea.l
#array,a0
; instruction size is long (rule 1)
move
func,d0
; instruction size is long (rule 2)
.opt
isize = w
; set default instruction size to word
move
func,d1
; instruction size is word (rule 2)
lea
(a0,d0),a1
; instruction size is long (rule 3)
jsr
(a1)
; not applicable
Figure 3.2: Instruction Sizing (asm68)