Texas Instruments MSP50C6xx Calculator User Manual


 
Assembler
5-14
Example:
#IFDEF symbol
; do something here
#ELSE
; do other things here
#ENDIF
#IFNDEF symbol
; do something here
#ELSE
; do other things here
#ENDIF
#START_FT: This directive is created by the C compiler when it outputs assembly
code to a file. It marks the beginning of the function table used to track function
calls and C variables in the emulator. Users should NEVER use this
directive in an assembly language program.
AORG expression: Marks the start of an ABSOLUTE segment code, i.e., a segment
that cannot be relocated by the linker. expression evaluates to the starting
address of the absolute segment in the program memory.
BYTE expression[,expression]: Introduces one or more data items, of BYTE size (8
bits) . The bytes are placed in program memory in the order in which they are
declared.
CHIP_TYPE chip_name: This directive is provided for compatibility with future chips
in the same family. It defines chip parameters (such as RAM and ROM size)
for the assembler. For now, the only defined chip name is MSP50C6xx.
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