Texas Instruments MSP-FET430 Computer Hardware User Manual


 
TI to IAR 2.x/3.x Assembler Migration
E-6
X SET X+1 ; Increment counter
ENDR
ENDM
Additional A430 Directives (IAR) A430 Directive (IAR)
Repeatable block assembly: Formal argument is substituted by each
character of a string.
REPTC
Repeatable block assembly: formal argument is substituted by each string
of a list of actual arguments.
REPTI
See also Preprocessor Directives
E.2.8 Symbol Control Directives
The scope of assembly-time symbols differs in the two assemblers. In
Asm430, definitions are global to a file, but can be undefined with the
.newblock directive. In A430, symbols are either local to a macro (LOCAL),
local to a module (EQU) or global to a file (DEFINE). In addition, the
preprocessor directive #define can also be used to define local symbols.
Description Asm430 Directive (TI) A430 Directive (IAR)
Assign a character string to a substitution
symbol
.asg SET or VAR or ASSIGN
Undefine local symbols .newblock 1)
Equate a value with a symbol .equ or .set EQU or =
Perform arithmetic on numeric substitution
symbols
.eval SET or VAR or ASSIGN
End structure definition .endstruct 2)
Begin a structure definition .struct 2)
Assign structure attributes to a label .tag 2)
1) No A430 directive directly corresponds to .newblock. However, #undef may be used to reset a symbol
that was defined with the #define directive. Also, macros or modules may be used to achieve the
.newblock functionality because local symbols are implicitly undefined at the end of a macro or module.
2) Definition of structure types is not supported. Similar functionality is achieved by using macros to allocate
aggregate data and base address plus symbolic offset, as shown below:
MYSTRUCT:MACRO
DS 4
ENDM
LO DEFINE 0
HI DEFINE 2
RSEG DATA16_Z
X MYSTRUCT
RSEG CODE
MOV X+LO,R4
...
Additional A430 Directives (IAR) A430 Directive (IAR)
Define a file-wide symbol DEFINE
Definition of special function registers (byte size) SFRB
Definition of special function registers (word size) SFRW