Texas Instruments MSP-FET430 Computer Hardware User Manual


 
TI to IAR 2.x/3.x Assembler Migration
E-2
E.1 Segment Control
RSEG defines a Relocatable SEGment. A relocatable segment means that
the code that follows the RSEG statement will be place *somewhere* in the
region defined for that segment (in the .xcl file). In other words, the code
can be "relocated", and you don't know (or care) where it's put. In the .xcl
files provided with the FET, multiple segments are defined in the same
memory regions. ASEG defines an Absolute SEGment. An absolute
segment means that the code that follows the ASEG statement will be
placed in the order it is encountered in the region defined for the segment
(in the .xcl file). In other words, the placement of the code is fixed in
memory. One significant difference between the new IAR assembler and
the old TI assembler is the meaning of the ORG statement. In the old TI
assembler, ORG would set the assembler code pointer to the specified
absolute address. However, the IAR assembler uses ORG to set an offset
from the current RSEG. Fortunately, if you don't use RSEG explicitly, it will
default to 0 (zero) and your program will link as you expect (with your code
at ORG). Be careful if you mix RSEG and ORG as ORG then becomes a
relative offset. Use ASEG if you want the (absolute) behavior of the old TI
ORG statement.
E.2 Translating Asm430 Assembler Directives to A430 Directives
E.2.1 Introduction
The following sections describe, in general, how to convert assembler
directives for Texas Instruments’ Asm430 assembler (Asm430) to
assembler directives for IAR’s A430 assembler (A430). These sections are
only intended to act as a guide for translation. For detailed descriptions of
each directive, refer to either the MSP430 Assembly Language Tools
User’s Guide, SLAUE12, from Texas Instruments, or the MSP430
Assembler User’s Guide from IAR.
Note: Only the assembler directives require conversion
Only the assembler directives require conversion - not the assembler
instructions. Both assemblers use the same instruction mnemonics,
operands, operators, and special symbols such as the section program
counter ($), and the comment delimiter (;).
The A430 assembler is not case sensitive by default. These sections show
the A430 directives written in uppercase to distinguish them from the
Asm430 directives, which are shown in lower case.
E.2.2 Character strings
In addition to using different directives, each assembler uses different
syntax for character strings. A430 uses C syntax for character strings: A
quote is represented using the backslash character as an escape character
together with quote (\”) and the backslash itself is represented by two