Predefined symbols
These predefined symbols are available:
Including symbol values in code
Several data definition directives make it possible to include a symbol value in the code. These directives define values or reserve memory. To include a symbol value in the code, use the symbol in the appropriate data definition directive.
For example, to include the time of assembly as a string for the program to display:
name timeOfAssembly
extern printString
public printTime
section CODE:CODE
data8 ; select data model
timdat DC8 __TIME__,",",__DATE__,0 ; timd for big-endian
code
printTime:
MOVW AX,#timdat ; load address of string
CALL printString ; routine to print string
endTesting symbols for conditional assembly
To test a symbol at assembly time, use one of the conditional assembly directives. These directives let you control the assembly process at assembly time.
For example, if you want to assemble separate code sections depending on whether you are using an old assembler version or a new assembler version, do as follows:
#if (__VER__ > 300) ; New assembler version
;…
;…
#else ; Old assembler version
;…
;…
#endifFor more information, see Conditional assembly directives.