User manual
Assembler directives ST Assembler-Linker
68/89 Doc ID 11392 Rev 4
Example
segment byte at 8000-C000 'EPROM1'
#LOAD “table.bin”
See also
Table 55. LOCAL
Purpose Define labels as local to macro.
Format LOCAL <arg>
Description
A macro that generates loop code gives rise to an assembly problem since the loop
label would be defined as many times as the macro is called. The LOCAL directive
enables you to overcome this difficulty.
Consider the following piece of code:
waiter MACRO ads
loop ld A,ads
jrne loop
MEND
If this macro is called twice, you will be creating two labels called 'loop'. The answer is
to declare very early in the MACRO all labels created by the macro as LOCAL. This
has the effect of replacing the actual name of a local label (here 'loop') with
LOCXXXX where XXXX starts from 0 and increments each time a local label is used.
This provides each occurrence of the labels created inside the macro with a unique
identity.
Example
waiter MACRO ads
LOCAL loop
loop led Aids
drone loop
MEND
See also MACRO, MEND
Table 56. LONG
Purpose Define long word in object code.
Format LONG <exp>[,<exp>...]
Description
This directive forces the long word(s) in its argument list into the object code at the
current address. The arguments may be composed of complex expressions, which
may even include external labels. If the argument was an expression and had a value
greater than FFFFFFFF then the 32 bits of the expression are used and no errors are
generated. LONG sends long words with the least significant byte first.
It's generally used for defining data tables. Synonymous with DC.L, except that LONG
sends the low-byte first.
Example
DC.L 1,$12345678 ; 0000,0001,1234,5678
LONG 1,$12345678 ; 0100,0000,7856,3421
See also DC.B, DC.L, DC.W, BYTE, STRING, WORD
Table 54. #LOAD