MSP 430 Dependent Features
**************************

Options
=======

AS has only -m flag which selects the mpu arch. Currently has no effect.

Syntax
======

Macros
------

The macro syntax used on the MSP 430 is like that described in the MSP 430 Family Assembler Specification.  Normal AS macros should still work.

Additional built-in macros are:

llo(exp)
     Extracts least significant word from 32-bit expression 'exp'.

lhi(exp)
     Extracts most significant word from 32-bit expression 'exp'.

hlo(exp)
     Extracts 3rd word from 64-bit expression 'exp'.

hhi(exp)
     Extracts 4rd word from 64-bit expression 'exp'.

They normally being used as an immediate source operand.

         mov	#llo(1), r10	;	== mov	#1, r10
         mov	#lhi(1), r10	;	== mov	#0, r10

Special Characters
------------------

; is the line comment character.

The character $ in jump instructions indicates current location and implemented only for TI syntax compatibility.

Register Names
--------------

General-purpose registers are represented by predefined symbols of the form rN (for global registers), where N represents a number between 0 and 15.  The leading letters may be in either upper or lower case; for example, r13 and R7 are both valid register names.

Register names PC, SP and SR cannot be used as register names and will be treated as variables. Use r0, r1, and r2 instead.

Assembler Extensions
--------------------

@rN
     As destination operand being treated as 0(rn)

0(rN)
     As source operand being treated as @rn

jCOND +N
     Skips next N bytes followed by jump instruction and equivalent to jCOND $+N+2

Floating Point
==============

The MSP 430 family uses IEEE 32-bit floating-point numbers.

MSP 430 Machine Directives
==========================

.file
     This directive is ignored; it is accepted for compatibility with other MSP 430 assemblers.

          Warning: in other versions of the GNU assembler, .file is used for the directive called .app-file in the MSP 430 support.

.line
     This directive is ignored; it is accepted for compatibility with other MSP 430 assemblers.

.arch
     Currently this directive is ignored; it is accepted for compatibility with other MSP 430 assemblers.

Opcodes
=======

AS implements all the standard MSP 430 opcodes.  No additional pseudo-instructions are needed on this family.

For information on the 430 machine instruction set, see MSP430 User's Manual, document slau049b, Texas Instrument, Inc.