DUP

Duplicate sequence of source lines.

  [
  label]     
  DUP       
  expression  .  . ENDM 
Remarks

The sequence of source lines between the DUP and ENDM directives are duplicated by the number specified by the integer expression. The expression can have any memory space attribute. If the expression evaluates to a number less than or equal to 0, the sequence of lines are not included in the Assembler output. The expression result must be an absolute integer and cannot contain any forward references (symbols that have not already been defined). The DUP directive may be nested to any level.

If label is present, it assigns the value of the runtime location counter at the start of the DUP directive processing.

Example

The sequence of source input statements,

COUNT SET 3

DUP COUNT ; ASR BY COUNT

NOP

ENDM

would generate the following in the source listing:

COUNT SET 3

NOP

NOP

NOP

See also

DUPA

DUPC

DUPF

ENDM

MACRO