Duplicate Source Lines. Freescale Semiconductor sc100
Pubblicità
Pubblicità
Freescale Semiconductor, Inc.
SC_Assem.book Page 114 Thursday, September 23, 2004 10:44 AM
Assembler Directives
Descriptions
DUP Duplicate Source Lines
Duplicates the following source lines the specified number of times; the ENDM directive marks the last line to be duplicated.
[label] DUP times
.
.
ENDM
Parameters
label
Optional label that receives the value of the runtime location counter at the start of directive processing.
times
Number of times to duplicate source lines: an expression that evaluates to an absolute integer. This expression can have any memory-space attribute, but must not contain any forward references. If the times value is less than or equal to zero, the assembler output does not include the sequence of lines.
Remarks
You may nest the DUP directive to any level. If the times value is less than or equal to zero, the assembler output does not include the sequence of lines.
To immediately halt source-line duplication, for example, upon detection of an error, use the EXITM directive and conditional-assembly directives.
Related Directives
DUPA , DUPC , DUPF , DUPA , EXITM, MACRO
Example
If MD and MEX options are enabled, and if input includes these lines:
COUNT SET 3
DUP COUNT
ASR D0
ENDM
; ASR BY COUNT
The source listing includes the line ASR
D0
three times.
114 SC100 Assembler User Guide
For More Information: www.freescale.com
Scarica
Pubblicità