| 1 | @c Copyright 2002 Free Software Foundation, Inc.
|
|---|
| 2 | @c This is part of the GAS manual.
|
|---|
| 3 | @c For copying conditions, see the file as.texinfo.
|
|---|
| 4 | @ifset GENERIC
|
|---|
| 5 | @page
|
|---|
| 6 | @node MSP430-Dependent
|
|---|
| 7 | @chapter MSP 430 Dependent Features
|
|---|
| 8 | @end ifset
|
|---|
| 9 | @ifclear GENERIC
|
|---|
| 10 | @node Machine Dependencies
|
|---|
| 11 | @chapter MSP 430 Dependent Features
|
|---|
| 12 | @end ifclear
|
|---|
| 13 |
|
|---|
| 14 | @cindex MSP 430 support
|
|---|
| 15 | @cindex 430 support
|
|---|
| 16 | @menu
|
|---|
| 17 | * MSP430 Options:: Options
|
|---|
| 18 | * MSP430 Syntax:: Syntax
|
|---|
| 19 | * MSP430 Floating Point:: Floating Point
|
|---|
| 20 | * MSP430 Directives:: MSP 430 Machine Directives
|
|---|
| 21 | * MSP430 Opcodes:: Opcodes
|
|---|
| 22 | @end menu
|
|---|
| 23 |
|
|---|
| 24 | @node MSP430 Options
|
|---|
| 25 | @section Options
|
|---|
| 26 | @cindex MSP 430 options (none)
|
|---|
| 27 | @cindex options for MSP430 (none)
|
|---|
| 28 | @code{@value{AS}} has only -m flag which selects the mpu arch. Currently has
|
|---|
| 29 | no effect.
|
|---|
| 30 |
|
|---|
| 31 | @node MSP430 Syntax
|
|---|
| 32 | @section Syntax
|
|---|
| 33 | @menu
|
|---|
| 34 | * MSP430-Macros:: Macros
|
|---|
| 35 | * MSP430-Chars:: Special Characters
|
|---|
| 36 | * MSP430-Regs:: Register Names
|
|---|
| 37 | * MSP430-Ext:: Assembler Extensions
|
|---|
| 38 | @end menu
|
|---|
| 39 |
|
|---|
| 40 | @node MSP430-Macros
|
|---|
| 41 | @subsection Macros
|
|---|
| 42 |
|
|---|
| 43 | @cindex Macros, MSP 430
|
|---|
| 44 | @cindex MSP 430 macros
|
|---|
| 45 | The macro syntax used on the MSP 430 is like that described in the MSP
|
|---|
| 46 | 430 Family Assembler Specification. Normal @code{@value{AS}}
|
|---|
| 47 | macros should still work.
|
|---|
| 48 |
|
|---|
| 49 | Additional built-in macros are:
|
|---|
| 50 |
|
|---|
| 51 | @table @code
|
|---|
| 52 |
|
|---|
| 53 | @item llo(exp)
|
|---|
| 54 | Extracts least significant word from 32-bit expression 'exp'.
|
|---|
| 55 |
|
|---|
| 56 | @item lhi(exp)
|
|---|
| 57 | Extracts most significant word from 32-bit expression 'exp'.
|
|---|
| 58 |
|
|---|
| 59 | @item hlo(exp)
|
|---|
| 60 | Extracts 3rd word from 64-bit expression 'exp'.
|
|---|
| 61 |
|
|---|
| 62 | @item hhi(exp)
|
|---|
| 63 | Extracts 4rd word from 64-bit expression 'exp'.
|
|---|
| 64 |
|
|---|
| 65 | @end table
|
|---|
| 66 |
|
|---|
| 67 | They normally being used as an immediate source operand.
|
|---|
| 68 | @smallexample
|
|---|
| 69 | mov #llo(1), r10 ; == mov #1, r10
|
|---|
| 70 | mov #lhi(1), r10 ; == mov #0, r10
|
|---|
| 71 | @end smallexample
|
|---|
| 72 |
|
|---|
| 73 | @node MSP430-Chars
|
|---|
| 74 | @subsection Special Characters
|
|---|
| 75 |
|
|---|
| 76 | @cindex line comment character, MSP 430
|
|---|
| 77 | @cindex MSP 430 line comment character
|
|---|
| 78 | @samp{;} is the line comment character.
|
|---|
| 79 |
|
|---|
| 80 | @cindex identifiers, MSP 430
|
|---|
| 81 | @cindex MSP 430 identifiers
|
|---|
| 82 | The character @samp{$} in jump instructions indicates current location and
|
|---|
| 83 | implemented only for TI syntax compatibility.
|
|---|
| 84 |
|
|---|
| 85 | @node MSP430-Regs
|
|---|
| 86 | @subsection Register Names
|
|---|
| 87 |
|
|---|
| 88 | @cindex MSP 430 register names
|
|---|
| 89 | @cindex register names, MSP 430
|
|---|
| 90 | General-purpose registers are represented by predefined symbols of the
|
|---|
| 91 | form @samp{r@var{N}} (for global registers), where @var{N} represents
|
|---|
| 92 | a number between @code{0} and @code{15}. The leading
|
|---|
| 93 | letters may be in either upper or lower case; for example, @samp{r13}
|
|---|
| 94 | and @samp{R7} are both valid register names.
|
|---|
| 95 |
|
|---|
| 96 | @cindex special purpose registers, MSP 430
|
|---|
| 97 | Register names @samp{PC}, @samp{SP} and @samp{SR} cannot be used as register names
|
|---|
| 98 | and will be treated as variables. Use @samp{r0}, @samp{r1}, and @samp{r2} instead.
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 | @node MSP430-Ext
|
|---|
| 102 | @subsection Assembler Extensions
|
|---|
| 103 | @cindex MSP430 Assembler Extensions
|
|---|
| 104 |
|
|---|
| 105 | @table @code
|
|---|
| 106 |
|
|---|
| 107 | @item @@rN
|
|---|
| 108 | As destination operand being treated as @samp{0(rn)}
|
|---|
| 109 |
|
|---|
| 110 | @item 0(rN)
|
|---|
| 111 | As source operand being treated as @samp{@@rn}
|
|---|
| 112 |
|
|---|
| 113 | @item jCOND +N
|
|---|
| 114 | Skips next N bytes followed by jump instruction and equivalent to
|
|---|
| 115 | @samp{jCOND $+N+2}
|
|---|
| 116 |
|
|---|
| 117 | @end table
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 | @node MSP430 Floating Point
|
|---|
| 121 | @section Floating Point
|
|---|
| 122 |
|
|---|
| 123 | @cindex floating point, MSP 430 (@sc{ieee})
|
|---|
| 124 | @cindex MSP 430 floating point (@sc{ieee})
|
|---|
| 125 | The MSP 430 family uses @sc{ieee} 32-bit floating-point numbers.
|
|---|
| 126 |
|
|---|
| 127 | @node MSP430 Directives
|
|---|
| 128 | @section MSP 430 Machine Directives
|
|---|
| 129 |
|
|---|
| 130 | @cindex machine directives, MSP 430
|
|---|
| 131 | @cindex MSP 430 machine directives
|
|---|
| 132 | @table @code
|
|---|
| 133 | @cindex @code{file} directive, MSP 430
|
|---|
| 134 | @item .file
|
|---|
| 135 | This directive is ignored; it is accepted for compatibility with other
|
|---|
| 136 | MSP 430 assemblers.
|
|---|
| 137 |
|
|---|
| 138 | @quotation
|
|---|
| 139 | @emph{Warning:} in other versions of the @sc{gnu} assembler, @code{.file} is
|
|---|
| 140 | used for the directive called @code{.app-file} in the MSP 430 support.
|
|---|
| 141 | @end quotation
|
|---|
| 142 |
|
|---|
| 143 | @cindex @code{line} directive, MSP 430
|
|---|
| 144 | @item .line
|
|---|
| 145 | This directive is ignored; it is accepted for compatibility with other
|
|---|
| 146 | MSP 430 assemblers.
|
|---|
| 147 |
|
|---|
| 148 | @cindex @code{sect} directive, MSP 430
|
|---|
| 149 | @item .arch
|
|---|
| 150 | Currently this directive is ignored; it is accepted for compatibility with other
|
|---|
| 151 | MSP 430 assemblers.
|
|---|
| 152 |
|
|---|
| 153 | @end table
|
|---|
| 154 |
|
|---|
| 155 | @node MSP430 Opcodes
|
|---|
| 156 | @section Opcodes
|
|---|
| 157 |
|
|---|
| 158 | @cindex MSP 430 opcodes
|
|---|
| 159 | @cindex opcodes for MSP 430
|
|---|
| 160 | @code{@value{AS}} implements all the standard MSP 430 opcodes. No
|
|---|
| 161 | additional pseudo-instructions are needed on this family.
|
|---|
| 162 |
|
|---|
| 163 | For information on the 430 machine instruction set, see @cite{MSP430
|
|---|
| 164 | User's Manual, document slau049b}, Texas Instrument, Inc.
|
|---|