TI to IAR 2.x/3.x Assembler Migration
consecutive backslashes (\\). In Asm430 syntax, a quote is represented by two consecutive quotes (“”). See examples below:
Character String | Asm430 Syntax (TI) | A430 Syntax (IAR) |
PLAN “C” | “PLAN “”C””” | “PLAN \”C\”” |
\dos\command.com | “\dos\command.com” | “\\dos\\command.com” |
Concatenated string (i.e. Error 41) | - | “Error ” “41” |
E.2.3 Section Control Directives
Asm430 has three predefined sections into which various parts of a program are assembled. Uninitialized data is assembled into the .bss section, initialized data into the .data section and executable code into the
.text section.
A430 also uses sections or segments, but there are no predefined segment names. Often, it is convenient to adhere to the names used by the C compiler: DATA16_Z for uninitialized data, CONST for constant (initialized) data and CODE for executable code. The table below uses these names.
A pair of segments can be used to make initialized, modifiable data PROM- able. The ROM segment would contain the initializers and would be copied to RAM segment by a
Description | Asm430 Directive (TI) | A430 Directive (IAR) |
Reserve size bytes in the .bss | .bss | 1) |
(uninitialized data) section |
|
|
Assemble into the .data (initialized data) | .data | RSEG const |
section |
|
|
Assemble into a named (initialized) | .sect | RSEG |
section |
|
|
Assemble into the .text (executable code) | .text | RSEG code |
section |
|
|
Reserve space in a named (uninitialized) | .usect | 1) |
section |
|
|
Alignment on byte boundary | .align | 2) |
Alignment on word boundary | .even | EVEN |
1)Space is reserved in an uninitialized segment by first switching to that segment, then defining the appropriate memory block, and then switching back to the original segment. For example:
RSEG DATA16_Z
LABEL: DS 16
RSEG CODE
2)Initialization of
Additional A430 Directives (IAR) | A430 Directive (IAR) |
Switch to an absolute segment | ASEG |
Switch to a relocatable segment | RSEG |
Switch to a common segment | COMMON |
Switch to a stack segment | STACK |
Alignment on specified address boundary (power of two) | ALIGN |
Set the location counter | ORG |