.irp

Repeats the statements of the block, each time substituting the next parameter value. The .endr directive must follow the statements.

.irp  name exp1[,exp2[,exp3]...]
statement-group
.endr
Parameters

name

Placeholder name for expression parameter values.

exp1, exp2, exp3

Expression parameter values; the number of these expressions determines the number of repetitions of the block statements.

statement-group

Any statements valid in assembly macros.

Example

The following listing specifies three repetitions of .byte, with successive name values 1, 2, and 3.

Listing: .irp Directive Example
      .irp    databyte  1,2,3
      .byte   databyte
      .endr

The following listing shows this expansion.

Listing: .irp Example Expansion
      .byte  1
      .byte  2
      .byte  3