|
|||||||||||
Technical Support On-Line Manuals Ax51 User's Guide ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Defining Standard MacrosStandard macros are defined as follows: macro-name MACRO <[>parameter-list<]> <[>LOCAL local-labels<]> . . . macro-body . . . ENDM Where
For example: LOAD_R0 MACRO R0_Val MOV R0, #R0_Val ENDM defines a macro named LOAD_R0 which loads register 0 with the value of the first parameter passed to the macro. Note
Macro ParametersParameters in the body of the macro are represented with the parameter name (src, dst, and cnt in the above example). They may be used any number of times and in any order within the macro body. If a parameter has the same name as the macro and is used in the macro body, the parameter is expanded. The macro is not called. Standard macros may have up to 16 parameters. Parameters must be separated by commas (',') in the macro definition and invocation. For example: mymacro MACRO P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 You would invoke this macro as follows: mymacro A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P You may pass a NULL value for a parameter by omitting that parameter from the macro invocation. The separating comma is still required. For example: mymacro A,,C,,E,,G,,I,,K,,M,,O, Null parameters may be tested using the NUL macro operator. | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.