Chapter 11 Writing Macro Control Statements
222 irpc
11.10 irpc
Syntax
irpc dummy_parameter, "string"
block
endm
Functional description
The irpc description repeatedly replaces the dummy parameter with each character in the specified
string one at a time. The dummy parameter can be used in the block. The macro expansion replaces the
dummy parameter with each character in turn, repeated for the number of characters.
Coding rules
The string cannot include the characters &, \, ', and ".
Symbols cannot be used within a block. If used, a double definition error will occur. The local directive
cannot be used either.
A dummy parameter appearing in a string or character constant inside the irpc block is not expanded.
Usage example
The following example uses the irpc directive.
_DATA section CODE, PUBLIC, 1
irpc dummy, “0123456789”
dc dummy
endm
end