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