Assembler
5-37
Code Development Tools
BYTE expression[,expression]: Introduces one or more data items, of BYTE
size (8 bits) . The bytes are placed in the program memory in the order in which
they are declared.
CHIP_TYPE chip_name: This directive is here for compatibility with future
chips in the same family. It defines some chip parameters (like RAM and ROM
size) for the assembler. For now, the only defined chip names are
MSP50P614/MSP50C614 and MSP50P614/MSP50C614.
DATA expression[,expression]: Introduces one or more data items, of
WORD size (16 bits) . The words are placed in the program memory in the
order in which they are declared. Even though the program memory is 17 bits
wide, only 16 bits can be read using assembly instructions (like MOV A0,*A0),
so the DATA directive only stores 16 bits per data expression.
DB expression[,expression]: Equivalent to BYTE directive
DEF symbol[,symbol]: Equivalent to GLOBAL directive
DW expression[,expression]: Equivalent to DATA directive
END expression: Expression defines the start–up vector for the current
assembly program. This directive generates the following assembly code;
AORG 0xFFFF
DATA expression
which defines the start-up vector of the program, i.e., the program address
where execution starts following INIT of the chip.
label EQU expression: Associates the value of
expression
with
label
.
EXTERNAL symbol[,symbol]: This directive is used to indicate to the
assembler that one or more symbols are external references, i.e., symbols that
will be resolved by the linker.
GLOBAL symbol[,symbol]: This directive is used to indicate to the
assembler that one or more symbols are global references. These symbols
MUST be defined in the current file, and will be used by the linker to resolve
external references (present in other files). GLOBAL should only be used for
PROGRAM labels. RAM variables are handled with the GLOBAL_VAR
directive.
GLOBAL_VAR symbol[,symbol]: This directive can be used to allow for
RAM variables to be referenced in a different file from where they were
defined. GLOBAL_VAR should be used prior to defining a RAM variable (with
the RESW directive, for example). The variable to be referenced in another file