TI to IAR 2.x/3.x Assembler Migration
X | SET | X+1 | ; Increment counter |
| ENDR |
|
|
| ENDM |
|
|
Additional A430 Directives (IAR) | A430 Directive (IAR) |
Repeatable block assembly: Formal argument is substituted by each | REPTC |
character of a string. |
|
Repeatable block assembly: formal argument is substituted by each string | REPTI |
of a list of actual arguments. |
|
See also Preprocessor Directives |
|
E.2.8 Symbol Control Directives
The scope of
.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 | .asg | SET or VAR or ASSIGN |
symbol |
|
|
Undefine local symbols | .newblock | 1) |
Equate a value with a symbol | .equ or .set | EQU or = |
Perform arithmetic on numeric substitution | .eval | SET or VAR or ASSIGN |
symbols |
|
|
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 | DEFINE |
Definition of special function registers (byte size) | SFRB |
Definition of special function registers (word size) | SFRW |