Keil Logo Arm Logo

A251 User's Guide

IRPC

The IRPC built-in macro is defined as follows:

IRPC parm-name, parm-string
macro-body
ENDM

Where

parm-name is the parameter name that is used in the macro-body. Each time the macro is expanded, subsequent characters from the parm-string are used to replace parm-name in the macro-body.
parm-string is the text string whose characters are used to replace parm-name in the macro-body.
macro-body is the text that is expanded when the macro is invoked.

For example:

IRPC sendchar, TEST
        MOV     R0, #'sendchar'
        CALL    outchar
ENDM

expands as:

        MOV     R0, #'T'
        CALL    outchar
        MOV     R0, #'E'
        CALL    outchar
        MOV     R0, #'S'
        CALL    outchar
        MOV     R0, #'T'
        CALL    outchar

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.