User manual

ST Assembler-Linker Assembler directives
Doc ID 11392 Rev 4 69/89
Table 57. LONGS
Purpose Default new label length long.
Format LONGS
Description
When a label is defined, four SEPARATE attributes are defined with it: scope
(internally or externally defined), value (actual numerical value of the label), relativity
(absolute or relative), and lastly, length (BYTE, WORD or LONG).
All these attributes except length are defined explicitly before or at the end of the
definition: you can force a label to be a certain length by giving a dot suffix, for
example 'label.b' forces it to be byte length.
You may also define a default state for label length: labels are created to this length
unless otherwise forced with a suffix. The default is set to WORD at the start of the
assembly, but may be changed by BYTES, WORDS or LONGS to the appropriate
length.
Example
LONGS
lab1 EQU 5 ; long length for lab1
See also BYTES, WORDS
Table 58. MACRO
Purpose Define macro template.
Format <macro> MACRO [param-1][,param-2]...
Description
This directive defines a macro template that can be invoked later in the program. The
label field holds the name of the macro: this name is used to invoke the rest of the
macro whenever it is found in the opcode field. The arguments are dummy names for
parameters that will be passed to the macro when it is used: these dummy names will
be replaced by the actual calling line's arguments.
Note: If you don't want the definition of the macro to be listed, insert directive .NOLIST
before the macro definition, and append directive .LIST after the macro definition.
Example
cmp16 MACRO first,second,result
LOCAL trylow
ld A,first
add A,second
cp A,#0
jreq trylow
cpl A
trylow ld result,A
MEND
See also MEND, .LALL, .SALL, .XAL
Table 59. MEND
Purpose End of macro definition.
Format MEND
Description End of macro definition.