.REPT


Tells the assembler to repeatedly expand a series of statements described between this directive and the .ENDM directive the number of times equivalent to the value of the absolute-expression specified in the operand field.

[Syntax]

Symbol field
Mnemonic field
Operand field
Comment field
[label:]
.REPT
   :
.ENDM
absolute-expression
[; comment]
 
[; comment]

[Function]

-

The .REPT directive tells the assembler to repeatedly expand a series of statements described between this directive and the .ENDM directive (called the REPT-ENDM block) the number of times equivalent to the value of the absolute-expression specified in the operand field.

[Description]

-

If no corresponding .ENDM directive is found for a .REPT directive in the same file, an error will occur

-

If the result of evaluating the absolute-expression is negative, the CC-RL outputs the message.

[Example]

    .REPT    3
    INC      B
    DEC      C
    .ENDM

 

The code is expanded as shown below after assembling.

    INC      B
    DEC      C
    INC      B
    DEC      C
    INC      B
    DEC      C