IRP              Assemble once for each parameter             Macro Directive

IRP dummy_argument, argument_list
macro_body
ENDM

Causes the assembler to assemble macro_body once for each element in
argument_list.

dummy_argument is the dummy argument used in the macro body.

argument_list consists of a list of arguments separated by commas. The
arguments can be any text, such as symbols, strings, numbers. You must
always surround argument_list with angle brackets (< >).

Examples: IRP reg,<ax,bx,cx,dx>
push reg
ENDM

IRP num,<0,1,2,5,6>
chr&num db 0ffh
ENDM

BCDops equ <DAA,DAS,AAA,AAS>
% IRP op,BCDops
proc op&_
op
ret
endp
ENDM

% IRP op,BCDops
IRP cf_,<0,1>
IRP af_,<0,1>
label op&test&&cf_&&&af_ byte ; DAAtest00 etc.
dw af_ shl 4 OR cf_ shl 0
dw offset op&_
db "&op : AL before and after ",0
ENDM
ENDM
ENDM