There are four directives to repeat a block of statements --
REPT
The REPT directive causes the statements in the macro body to be repeated a number of times equivalent to the value of the specified expression.,
WHILE
The WHILE directive causes the statments in the macro body to be repeated until the specified expression evaluates to false (zero).,
IRP
The IRP directive causes the statements in the macro body to be repeated once for each argument., and
IRPC
The IRPC directive causes the statements in the macro body to be repeated once for each character in the string argument..
These directives can be used both inside and outside a macro
definition.
They are mostly used to define and initialize variables in
a data segment.
Each directive identifies the beginning of a block of
statements and ENDM indicates the end of a repeat block.
We will briefly discuss next these four directives.