Ax51 User's Guide

IRP

The IRP built-in macro is defined as follows:

IRP parm-name, <parm-list>
macro-body
ENDM

Where

parm-nameis the parameter name that is used in the macro-body. Each time the macro is expanded, subsequent values from the parm-list are used to replace parm-name in the macro-body.
parm-listis the list of parm-name replacement values.
macro-bodyis the text that is expanded when the macro is invoked.

For example:

IRP regnum, <R0,R1,R2,R3,R4>
        PUSH    A&regnum
ENDM

expands as:

        PUSH    AR0
        PUSH    AR1
        PUSH    AR2
        PUSH    AR3
        PUSH    AR4