Section 3: Assembler
139
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
Instruction statements direct the assembler to generate object code for the
68000 instructions (see section 3.4 Instruction Set). Directive statements either
modify the behavior of the assembler or direct the assembler to generate object
code (see section 3.6 Asm68 Assembler Directives). Assignment statements
associate constant values with symbols (see section 3.3.5.3 Symbol
Assignment). Comment statements are ignored by the assembler; they allow
source files to contain explanatory text. The maximum length of any statement is
256 characters.
3.3.2.2.
Statement Syntax (asm68k)
The syntaxes for the various types of assembler statements accepted by
asm68k are summarized in Table 3.4. Labels can begin in any column, provided
they are followed by a colon; otherwise, they must begin in column one.
Instruction and directive mnemonics, as well as macro invocations, cannot begin
in column one.
Statement
Syntax
Label
label [ :] [ ! | ; comment ]
Instruction
[
label [ :] ] instruction [operand ] [ [ ! | ; ] comment ]
Directive
[
label [ :] ] directive [operand ] [comment ]
Equate
label [ :] equate operand [comment ]
Macro
[
label [ :] ] macro [operand ] [ [ ! | ; ] comment ]
Comment
{ * | ; } comment
Table 3.4: Statement Syntax (asm68k)
Whitespace (i.e., spaces and tabs) is used to separate the various fields of a
statement; it can be used within the operand field as part of a character constant
or in the comment field. An exclamation point ( ! ) or a semicolon ( ; ) is required
at the beginning of the comment field when the preceding operation has optional
operands that have been omitted. The asterisk (
*
) or semicolon ( ; ) that is used
to begin a comment statement can appear in any column.
Instruction statements direct the assembler to generate object code for the
68000 instructions (see section 3.4 Instruction Set). Directive statements either
modify the behavior of the assembler or direct the assembler to generate object
code (see section 3.7 Asm68k Assembler Directives). Macro statements allow
common sequences of code to be easily duplicated (see section 3.8 Asm68k
Macros). Comment statements are ignored by the assembler; they allow source
files to contain explanatory text. The maximum length of any statement is 256
characters.